Skip to main content
Solved

Draw a dodecagon

  • November 18, 2024
  • 8 replies
  • 88 views

ienesaglam60
Contributor
Forum|alt.badge.img+3

I have coordinate list. 

I want to draw a dodecagon with a known radius.

example

 

Best answer by ebygomm

If you buffer a point with a round end cap style and an interpolation angle of 30 you get a dodecagon

 

View original
Did this help you find an answer to your question?

8 replies

jobvdnoort
Supporter
Forum|alt.badge.img+10
  • Supporter
  • November 18, 2024
ienesaglam60 wrote:

I have coordinate list. 

I want to draw a dodecagon with a known radius.

example

 

Hi ienesaglam60,

I made you an example.

X coordinate = $(Radius) *@cos(@Value(_creation_instance)* 30 * @pi() / 180)

Y coordinate = $(Radius) *@sin(@Value(_creation_instance)* 30 * @pi() / 180)

 

I added a userparameter for the radius.

 

For your case, make sure you have 12 instances per coordinate and run the rest of this workbench :) 

 

Hope this helps :) 


nielsgerrits
VIP

One way to do this is:

  • VertexCreator to place point on desired place.
  • Bufferer to replace point with circle using radius.
  • GeometryCoercer to convert to line.

  • ArcStroker to stroke circle to dodecagon.

Another way to do this is to calculate the vertices from the dodecagon based on insertion point and radius and put these values in an XML and feed this in the GeometryReplacer.

<?xml version="1.0" encoding="US_ASCII" standalone="no" ?>

<geometry>

    <path>

        <line>

            <coord x="5" y="0"/>

            <coord x="3.5355339059327378" y="-3.5355339059327378"/>

            <coord x="0" y="-5"/>

            <coord x="-3.5355339059327378" y="-3.5355339059327378"/>

            <coord x="-5" y="0"/>

            <coord x="-3.5355339059327378" y="3.5355339059327378"/>

            <coord x="0" y="5"/>

            <coord x="3.5355339059327378" y="3.5355339059327378"/>

            <coord x="5" y="0"/>

        </line>

    </path>

</geometry>


ienesaglam60
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • November 18, 2024
jobvdnoort wrote:
ienesaglam60 wrote:

I have coordinate list. 

I want to draw a dodecagon with a known radius.

example

 

Hi ienesaglam60,

I made you an example.

X coordinate = $(Radius) *@cos(@Value(_creation_instance)* 30 * @pi() / 180)

Y coordinate = $(Radius) *@sin(@Value(_creation_instance)* 30 * @pi() / 180)

 

I added a userparameter for the radius.

 

For your case, make sure you have 12 instances per coordinate and run the rest of this workbench :) 

 

Hope this helps :) 

 I use FME 2022 version. Would you show me AttributeCreator parameters?


jobvdnoort
Supporter
Forum|alt.badge.img+10
  • Supporter
  • November 18, 2024
ienesaglam60 wrote:
jobvdnoort wrote:
ienesaglam60 wrote:

I have coordinate list. 

I want to draw a dodecagon with a known radius.

example

 

Hi ienesaglam60,

I made you an example.

X coordinate = $(Radius) *@cos(@Value(_creation_instance)* 30 * @pi() / 180)

Y coordinate = $(Radius) *@sin(@Value(_creation_instance)* 30 * @pi() / 180)

 

I added a userparameter for the radius.

 

For your case, make sure you have 12 instances per coordinate and run the rest of this workbench :) 

 

Hope this helps :) 

 I use FME 2022 version. Would you show me AttributeCreator parameters?

 

Attached an older version :) 


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • Best Answer
  • November 18, 2024

If you buffer a point with a round end cap style and an interpolation angle of 30 you get a dodecagon

 


nielsgerrits
VIP
ebygomm wrote:

If you buffer a point with a round end cap style and an interpolation angle of 30 you get a dodecagon

 

And we have a winner!


david_r
Evangelist
  • November 19, 2024
ebygomm wrote:

If you buffer a point with a round end cap style and an interpolation angle of 30 you get a dodecagon

 

“Why waste time say lot word when few word do trick”

Excellent :-)


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • November 20, 2024
david_r wrote:

“Why waste time say lot word when few word do trick”

 

Lol: Got me remembering this Kevin scene in The Office. 😄  Still up in my Top 5 comedy shows.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings