Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Plotting cuduceaus curve in gnuplot

37 views
Skip to first unread message

xels...@gmail.com

unread,
Oct 22, 2010, 10:55:32 AM10/22/10
to
I am not a mathematician and am struggling to plot a Caduceus fractal
cascade curve in gnuplot.

http://caltek.net/dan/connectivity/phibiz/ekgtree/ekgtree6.gif

I can use basic gnuplot syntax and I've plotted a few basic curves but
I can't work out how to plot one of the two curves shown above. Each
decays by golden section - each smaller wave compares to the previous
by golden section relation in amplitude and wavelength.

Can anyone here do this ?

I am wanting to accurately plot this for import into a softsynth.

Péter Juhász

unread,
Oct 22, 2010, 12:16:47 PM10/22/10
to
On Oct 22, 4:55 pm, "xelsio...@googlemail.com" <xelsio...@gmail.com>
wrote:

Here it is:

#############################################
maxn = 10
phi = 0.5*(-1+sqrt(5))
s(n) = (1-phi**(n+1))/(1-phi)
c(x,n) = (x >= (n==0 ? 0 : pi*s(n-1))) && (x < pi*s(n)) \
? phi**n*sin((x-pi*s(n-1))/phi**n ) \
: 1/0

set samples 1000
unset key
set xr [0:pi*s(maxn)]
unset tics
unset border

plot for [n=0:maxn] c(x,n) w l lt -1, for [n=0:maxn] -c(x,n) w l lt -1
############################################

I'm sure there is a more elegant recursive solution, but I can't be
assed to find it right now.

An interesting optical illusion: the width of the 3rd, 4th, etc. lobes
combined is exactly equal to that of the first, but it seems much
longer.

Péter Juhász

xels...@gmail.com

unread,
Oct 22, 2010, 4:33:33 PM10/22/10
to
Thanks so much ! I wouldn't have managed that on my own. I'll try it
out later.

If you're interested then this is the page the graphic is from ...
http://caltek.net/dan/connectivity/phibiz/ekgtree/ekgtree.html ... the
context of Caduceus and biological systems is covered in great depth
here - http://goldenmean.info - http://www.fractalfield.com

xels...@gmail.com

unread,
Oct 23, 2010, 6:39:33 AM10/23/10
to
I tried it and it works fine. Prob is that I want to extract only one
of two sine waves in the plot. I tried removing one of the function
plots but that plots a single but different shaped curve. I can prob
export to EPS and edit out what I don't need but then I might have
problems with numerical coordinates (the softsynth imports a single
curve based on a string of numbers from -1 to +1, you can see what I'm
trying to do here - http://portal.djbarney.org/node/71 )

On Oct 22, 5:16 pm, Péter Juhász <peter.juhas...@gmail.com> wrote:

Péter Juhász

unread,
Oct 23, 2010, 9:17:29 AM10/23/10
to
On Oct 23, 12:39 pm, "xelsio...@googlemail.com" <xelsio...@gmail.com>
wrote:

Modify the function definition like this:

c(x,n) = (x >= (n==0 ? 0 : pi*s(n-1))) && (x < pi*s(n)) \

? (-1)**n*phi**n*sin((x-pi*s(n-1))/phi**n ) \
: 1/0

Note that there is no "one of two sine waves" here: there are
individual lobes of several sine curves, each scaled and translated
appropriately so that they appear to form a single curve.

If all you need is a table of values instead of a graphical plot, use
"set table".

Please also note that I view this problem as a mildly interesting
mathematical distraction only - I distance myself from the content of
the linked sites.

Péter Juhász

xels...@gmail.com

unread,
Oct 26, 2010, 11:12:23 AM10/26/10
to
Cheers. Here is a screen shot of the final plot in the Wavedraw VST
synth.

http://portal.djbarney.org/node/71#Here_it_is:_Actually_Plotting_the_Caduceus_Curve

0 new messages