Basicprogramming(.org) > Code and examples
Fun Shapes with Pedal Equation
B+:
--- Quote from: Mike Lobanovsky on April 11, 2017, 10:33:48 PM ---Isn't it supposed to be called "peTal", not "pedal", equation? ;)
--- End quote ---
I was checking out Andy's Superformula reference
https://en.wikipedia.org/wiki/Superformula
and linked to
superellipse
but no not that ???
somewhere I ran into a description of Superformula that called the main exponent n/(n+1) Pedal equations.
funny I don't remember these:
https://en.wikipedia.org/wiki/Pedal_equation
https://en.wikipedia.org/wiki/Pedal_curve
So this code might just be special cases of Superformula, not Pedal, though Superformula has -1/n1 as main exponent.
Aurel:
wait a moment ...
I don't know how i miss this topic :-X
It looks to me that this superformula can draw patterns ..right?
based on given shape
i have a look on wikipedia and found this :
function sf2d(n, a)
u = [0:.001:2 * pi];
raux = abs(1 / a(1) .* abs(cos(n(1) * u / 4))) .^ n(3) + abs(1 / a(2) .* abs(sin(n(1) * u / 4))) .^ n(4);
r = abs(raux) .^ (- 1 / n(2));
x = r .* cos(u);
y = r .* sin(u);
plot(x, y);
end
I don't know GNU octave ..so what should be blue part with varible u ::)
u
ZXDunny:
Aurel: https://octave.org/doc/v4.0.1/Ranges.html
Aurel:
Hi Paul
.so this is array with 3 element
or array with 3 dimension ... i am confused ::) or am I too rusty ;D
by the way on link you give me it is represented as ranges ??
i don't know any BASIC which have ranges ???
ok so far i get this polarPlott
with just circles it looks little bit ...like antenna polar plot
Tomaaz:
--- Quote from: Aurel on May 02, 2019, 05:10:10 PM ---.so this is array with 3 element
or array with 3 dimension ... i am confused ::) or am I too rusty ;D
--- End quote ---
I don't know Octave, but it looks like it represents all numbers between 0 and 2 * pi step 0.01.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version