Skip to main content
Solved

Draw a dodecagon

  • November 18, 2024
  • 8 replies
  • 129 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

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

jobvdnoort
Supporter
Forum|alt.badge.img+11
  • Supporter
  • November 18, 2024

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
Forum|alt.badge.img+61

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

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+11
  • Supporter
  • November 18, 2024

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+45
  • 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
Forum|alt.badge.img+61

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
Celebrity
  • November 19, 2024

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

“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.