Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline SteelCat  
#1 Posted : 17 May 2020 22:24:07(UTC)
SteelCat


Rank: Advanced Member

Groups: Registered
Joined: 02/05/2020(UTC)
Posts: 41
Italy

Was thanked: 3 time(s) in 3 post(s)
Hi everyone,
I'm looking for suggestions to find the intersection of two polygons and hatch the result.

The most particular case concerns the hatching of a part of polygon intersected by a straight line.

I know some basic of X-Y plot to draw a polygon...
Physics is like sex. Sure, it may give some practical results, but that’s not why we do it. (R. Feynman)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline mkraska  
#2 Posted : 17 May 2020 23:12:07(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
Perhaps the GPC (general polygon clipping library) wrapper plugin might help. The basics are described in section G.3 of the german handbook.

You also might have a look at the hatch and fill snippet.


GPC.sm (7kb) downloaded 76 time(s).

2017-03-29 14_54_45-SMath Studio 0.98.6179 - [Blatt1_].png

Edited by user 17 May 2020 23:16:17(UTC)  | Reason: Not specified

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 18/05/2020(UTC)
Offline Jean Giraud  
#3 Posted : 18 May 2020 17:04:20(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Otherwise, piece wise from native Smath ... just demo.

Circular Polygon.sm (21kb) downloaded 21 time(s).
Offline Razonar  
#4 Posted : 18 May 2020 18:31:53(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Hi. Maybe you also can check this discussion: https://en.smath.com/for..._Line-intersections.aspx

Best regards.
Alvaro.
Offline Jean Giraud  
#5 Posted : 19 May 2020 02:56:55(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
IMHO, I don't see much interest for polygon intersection.
For your interest: Intersection Pentastar.

Maths Polygon Solve Intersection.sm (22kb) downloaded 13 time(s).
Maths Polygon Intersection Pentastar.sm (36kb) downloaded 9 time(s).
Offline Jean Giraud  
#6 Posted : 19 May 2020 04:32:09(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
For your interest: Intersection Pentastar.

...labels added, superb for publishing.

Maths Polygon Intersection Pentastar.sm (48kb) downloaded 18 time(s).
Offline SteelCat  
#7 Posted : 19 May 2020 17:38:48(UTC)
SteelCat


Rank: Advanced Member

Groups: Registered
Joined: 02/05/2020(UTC)
Posts: 41
Italy

Was thanked: 3 time(s) in 3 post(s)
thank you all, I will do some application
Physics is like sex. Sure, it may give some practical results, but that’s not why we do it. (R. Feynman)
Offline ianlh  
#8 Posted : 23 May 2020 12:37:34(UTC)
ianlh


Rank: Advanced Member

Groups: Registered
Joined: 18/12/2014(UTC)
Posts: 38

Question:

How would you then calculate / determine the length of the clipped line?
Interested for tension and shear lengths in unusual shapes
Offline Jean Giraud  
#9 Posted : 23 May 2020 17:24:32(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... refreshed/generalized/augmented [A, P, CG]

2D Plot Setup Critical Polygon Intersection.sm (32kb) downloaded 17 time(s).
Offline Jean Giraud  
#10 Posted : 23 May 2020 19:04:57(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: ianlh Go to Quoted Post
How would you then calculate / determine the length of the clipped line?
Interested for tension and shear lengths in unusual shapes

From the attached Smath document.
Offline SteelCat  
#11 Posted : 23 May 2020 19:11:13(UTC)
SteelCat


Rank: Advanced Member

Groups: Registered
Joined: 02/05/2020(UTC)
Posts: 41
Italy

Was thanked: 3 time(s) in 3 post(s)
Originally Posted by: ianlh Go to Quoted Post
Question:

How would you then calculate / determine the length of the clipped line?
Interested for tension and shear lengths in unusual shapes


From coords, using Pitagora's theorem

Originally Posted by: Jean Giraud Go to Quoted Post
... refreshed/generalized/augmented [A, P, CG]

2D Plot Setup Critical Polygon Intersection.sm (32kb) downloaded 17 time(s).


Very nice.

Physics is like sex. Sure, it may give some practical results, but that’s not why we do it. (R. Feynman)
Users browsing this topic
Guest
Similar Topics
Polygon Intersection Demo (Samples)
by Jean Giraud 24/05/2020 04:40:51(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.