Equally divided supershape

DaiKandil

New member
Joined
Aug 5, 2020
Messages
2
Hello
I am trying to divide an octagon built by the Super-Shape formula equally. What I mean by equally is all the pixels should have the same length and the 8 corners of the octagon must meet with pixels corner
1596613535198.png1596613573382.png
this is what i want in all corners
1596613609918.png

this always happens with different ratios whatever division length i use

And here is the formula I used to create the curve
1596613749395.png
and the values are :
a=b = 55
n1=n2=n3=1
m=8
angle> range from 0 to 2 pi.
When I change b=52 it sounds closer to be correct but not exactly

any help will be really appreciated,
Thanks!
 
Last edited:
I don't think that that is possible.
Let's suppose that [MATH]r(\theta)=R[/MATH] at the spikes. Consider the cases when [MATH]\theta=0[/MATH] and [MATH]\theta=\pi/4[/MATH].
If [MATH]R=n\text{[pixels]}[/MATH], then the spike at [MATH]\theta=\pi/4[/MATH] is high by [MATH]R\sin(\pi/4)=\frac{\sqrt 2}{2}n\text{[pixels]}[/MATH], and its projection on the horizontal axis is of the same value.
Since [MATH]\frac{\sqrt 2}{2}n[/MATH] is irrational, it follows that you cannot have what you want.
You can verify this from your image. You have [MATH]R=16\text{[pixels]}[/MATH], and so the height and the leg of the spike at [MATH]\theta=\pi/4[/MATH] are approximately [MATH]11.3\text{[pixels]}[/MATH].
You can, however, choose [MATH]n[/MATH] so that [MATH]\frac{\sqrt 2}{2}n[/MATH] is as close as possible to an integer. For example, with [MATH]n=17[/MATH], you'd get [MATH]12.02\text{[pixels]}[/MATH], and with [MATH]n=99[/MATH], you'd get [MATH]70.003\text{[pixels]}[/MATH]!
 
Last edited:
I don't think that that is possible.
Let's suppose that [MATH]r(\theta)=R[/MATH] at the spikes. Consider the cases when [MATH]\theta=0[/MATH] and [MATH]\theta=\pi/4[/MATH].
If [MATH]R=n\text{[pixels]}[/MATH], then the spike at [MATH]\theta=\pi/4[/MATH] is high by [MATH]R\sin(\pi/4)=\frac{\sqrt 2}{2}n\text{[pixels]}[/MATH], and its projection on the horizontal axis is of the same value.
Since [MATH]\frac{\sqrt 2}{2}n[/MATH] is irrational, it follows that you cannot have what you want.
You can verify this from your image. You have [MATH]R=16\text{[pixels]}[/MATH], and so the height and the leg of the spike at [MATH]\theta=\pi/4[/MATH] are approximately [MATH]11.3\text{[pixels]}[/MATH].
You can, however, choose [MATH]n[/MATH] so that [MATH]\frac{\sqrt 2}{2}n[/MATH] is as close as possible to an integer. For example, with [MATH]n=17[/MATH], you'd get [MATH]12.02\text{[pixels]}[/MATH], and with [MATH]n=99[/MATH], you'd get [MATH]70.003\text{[pixels]}[/MATH]!
thank you !
 
Top