POV-Ray : Newsgroups : povray.general : #While Loop Equation for Lissajous Figures ? Server Time
16 Nov 2024 11:15:37 EST (-0500)
  #While Loop Equation for Lissajous Figures ? (Message 1 to 4 of 4)  
From: Ken
Subject: #While Loop Equation for Lissajous Figures ?
Date: 5 Sep 1998 08:48:25
Message: <35F12490.D8B4B815@pacbell.net>
Anybody have a working equation for making lissajous figures ?
Preferably one using something like a #while loop.

Thanks

Ken


Post a reply to this message

From: Peter Popov
Subject: Re: #While Loop Equation for Lissajous Figures ?
Date: 5 Sep 1998 16:10:57
Message: <35f18cc1.0@news.povray.org>
Ken wrote in message <35F12490.D8B4B815@pacbell.net>...
>Anybody have a working equation for making lissajous figures ?
>Preferably one using something like a #while loop.
>
>Thanks
>
>Ken
>

A Lessajous figure is the path a point follows as it oscilates in two or
more different planes. Simply, if you oscilate the x, y, and z coords of a
sphere you'll get a Lessajou figure.

This should work if there're no typos. I just posted one with typos,
canceled it and am reposting it.

// A simple Lessajou
// POV 3.1 code

#declare Spheres=10000;

#declare coeff_X=2;
#declare coeff_Y=5;
#declare coeff_Z=7;

#declare phase_X=0;
#declare phase_Y=0;
#declare phase_Z=0;

#declare dummy=0;
#while (dummy<1)
  sphere
  {
    <sin(2*pi*(dummy+phase_X)*coeff_X),
     sin(2*pi*(dummy+phase_Y)*coeff_Y),
     sin(2*pi*(dummy+phase_Z)*coeff_Z)>*10, 1
     texture
     { pigment { color rgb <sin(2*pi*dummy*10),0,1-sin(2*pi*dummy*10)> }
       finish { ambient 0.1 diffuse 0.7 brilliance 2.25 specular 0.75
roughness 0.005 phong 0.25 phong_size 7.5 metallic 0.5 }
     }
     no_shadow
  }

  #declare dummy=dummy+1/Spheres;
#end

light_source { <10000,10000,-10000> color rgb 1 }

camera { location -40*z up y right x angle 30 look_at 0 }

// End of code
// render a square image

I am typing this directly in Outlook Express so a) please forgive the
ugliness, OE is no match for the new editor in POVWIN, and b) haven't tested
it (should work, but who knows?). Also, I have no darn idea what this will
look like, but it is a Lessajou figure

Post some of your Lessajous when you're ready with them.

Peter


Post a reply to this message

From: Peter Popov
Subject: Re: #While Loop Equation for Lissajous Figures ?
Date: 5 Sep 1998 16:52:30
Message: <35f1967e.0@news.povray.org>
Ken wrote in message <35F19532.A4AE4935@pacbell.net>...
>Thank you sir. I will check it out and let you know the outcome.
>
>Ken
>


Always glad to help.

Peter

(heh, never been called "sir" before... I'm 18 :)


Post a reply to this message

From: Ken
Subject: Re: #While Loop Equation for Lissajous Figures ?
Date: 6 Sep 1998 00:13:40
Message: <35F1FD6A.14EC235E@pacbell.net>
Peter Popov wrote:

> Ken wrote in message <35F19532.A4AE4935@pacbell.net>...
> >Thank you sir. I will check it out and let you know the outcome.
> >
> >Ken
> >
>

You can now see an example of it's application on thebinaries.images NG. Titled
"Oh No Knot Again".

> Always glad to help.
>
> Peter
>
> (heh, never been called "sir" before... I'm 18 :)

  An honorarium that is bestowed upon one who is
worthy of the title. In this case your deeds merited
the act. But don't let it go to your head.

Thanks again sir.

Ken


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.