POV-Ray : Newsgroups : povray.advanced-users : Math help needed here, please Server Time
26 Nov 2024 15:17:27 EST (-0500)
  Math help needed here, please (Message 1 to 3 of 3)  
From: James Cannon
Subject: Math help needed here, please
Date: 21 Jan 2000 05:28:10
Message: <388834ba@news.povray.org>
Hi! I'm trying to spruce up my web page with some POV-Ray 3D art. I have
created an object, but would like to repeat the object in a double-helix
pattern. It's stupid, a union of text "0101" objects, I can only manage to
string them in a straight line!! (Imagine that!) It looks like a lame binary
ladder right now. How can I get it to twist?

TIA!!


Post a reply to this message

From: Nieminen Juha
Subject: Re: Math help needed here, please
Date: 21 Jan 2000 10:44:21
Message: <38887ed5@news.povray.org>
James Cannon <jam### [at] hotmailcom> wrote:
: Hi! I'm trying to spruce up my web page with some POV-Ray 3D art. I have
: created an object, but would like to repeat the object in a double-helix
: pattern. It's stupid, a union of text "0101" objects, I can only manage to
: string them in a straight line!! (Imagine that!) It looks like a lame binary
: ladder right now. How can I get it to twist?

  For example this way:

#declare ObjectsAmnt=100;
#declare MaxAngle=360;
#declare MaxHeight=20;
#declare Radius=5;

#declare ind=0;
#while(ind<ObjectsAmnt)
  #declare fact=ind/(ObjectsAmnt-1);
  #declare Angle=MaxAngle*fact;
  #declare Height=MaxHeight*fact;
  object { MyObject translate -z*Radius+y*Height rotate y*Angle }
  #declare ind=ind+1;
#end

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: James Cannon
Subject: Re: Math help needed here, please
Date: 27 Jan 2000 04:09:31
Message: <38900b4b@news.povray.org>
Thanks! It worked out. I had not used a #while before, so I learned two
things. It really shortened my scene file. I had a whole bunch of
object {
    Myobject
    translate ...
    rotate ..
}
...

I didn't understand the formula, but after experimenting with different
things (Height), I was able to get something going. Thanks.

Nieminen Juha wrote in message <38887ed5@news.povray.org>...
>James Cannon <jam### [at] hotmailcom> wrote:
>: Hi! I'm trying to spruce up my web page with some POV-Ray 3D art. I have
>: created an object, but would like to repeat the object in a double-helix
>: pattern. It's stupid, a union of text "0101" objects, I can only manage
to
>: string them in a straight line!! (Imagine that!) It looks like a lame
binary
>: ladder right now. How can I get it to twist?
>
>  For example this way:
>
>#declare ObjectsAmnt=100;
>#declare MaxAngle=360;
>#declare MaxHeight=20;
>#declare Radius=5;
>
>#declare ind=0;
>#while(ind<ObjectsAmnt)
>  #declare fact=ind/(ObjectsAmnt-1);
>  #declare Angle=MaxAngle*fact;
>  #declare Height=MaxHeight*fact;
>  object { MyObject translate -z*Radius+y*Height rotate y*Angle }
>  #declare ind=ind+1;
>#end
>
>--
>main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
>):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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