POV-Ray : Newsgroups : povray.binaries.images : Quiz Server Time
2 Oct 2024 14:14:53 EDT (-0400)
  Quiz (Message 11 to 17 of 17)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: David Fontaine
Subject: Re: Quiz
Date: 10 May 2000 22:44:16
Message: <391A1DC6.2D240@faricy.net>
1) Intersecting cylinders
2) Rotating torii
3) Rotating cylinders (and it's a hyperbola BTW :-p)
And I haven't read any replies yet

--
David Fontaine     <dav### [at] faricynet>     ICQ 55354965
Please visit my website: http://www.faricy.net/~davidf/


Post a reply to this message

From: Warp
Subject: Re: Quiz
Date: 11 May 2000 06:31:00
Message: <391a8be3@news.povray.org>
This one is cool.
  (And this time you'll have to figure out the code yourself):


Post a reply to this message


Attachments:
Download 'image.jpg' (36 KB)

Preview of image 'image.jpg'
image.jpg


 

From: Gail Shaw
Subject: Re: Quiz
Date: 11 May 2000 07:57:19
Message: <391aa01f@news.povray.org>
Warp wrote in message <391a8be3@news.povray.org>...
>  This one is cool.
>  (And this time you'll have to figure out the code yourself):
>


torii, centered just to one side of the centre of that object,
rotated and translated around.

Gail
********************************************************************
* gsh### [at] monotixcoza              * Reality.dat not found         *
* http://www.rucus.ru.ac.za/~gail/ * Attempting to reboot universe *
********************************************************************
* The best way to accelerate Windows NT is at 9.8 m/s^2      *
********************************************************************


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Quiz
Date: 11 May 2000 08:08:19
Message: <391AA2AD.991F4EC3@online.no>
Warp wrote:

>   This one is cool.

Yes.I think so too.

>   (And this time you'll have to figure out the code yourself):

It looks familiar. Heres how I did it:

#declare MajR = 5;
#declare MinR = 1.5;

#declare SmallTorus = torus { MajR, 0.25 }
#declare TVector = MajR*y + MinR*z;
#declare TVector = TVector - 2.5*y; // Remove this line to get a proper torus

#declare TiltedTorus = vtilt(SmallTorus, TVector)

object {
  CircleSpread(TiltedTorus, MinR, 24)
  pigment { color Green }
}

(See below for the rest of my code.)

Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


#macro VectorAngles(Vector)

  <acos(vnormalize((x+z)*Vector).x)*(Vector.z < 0 ? -1 : 1),
   acos(vnormalize(Vector).y),
   0>

#end // macro VectorAngles


#macro vtilt(Thing, TVector)

  #local RotateAngles = VectorAngles(TVector);

  object {
    Thing
    rotate  degrees(RotateAngles.x)*y
    rotate -degrees(RotateAngles.y)*z
    rotate -degrees(RotateAngles.x)*y
  }

#end // macro vtilt


#macro CircleSpread(Thing, Radius, Nr)

  #local deg = 360/Nr;
  #local MaxCnt = int(Nr);
  #local Cnt = 0;

  merge {
    #while (Cnt < MaxCnt)
      object {
        Thing
        translate Radius*x
        rotate  Cnt*deg*y
      }
      #local Cnt = Cnt + 1;
    #end // while
  }

#end // macro CircleSpread

// ====================================================

#declare MajR = 5;
#declare MinR = 1.5;

#declare SmallTorus = torus { MajR, 0.25 }
#declare TVector = MajR*y + MinR*z;
#declare TVector = TVector - 2.5*y; // Remove this line to get a proper torus

#declare TiltedTprus = vtilt(SmallTorus, TVector)

object {
  CircleSpread(TiltedTprus, MinR, 24)
  pigment { color Green }
}

/*
torus {
  MajR, MinR
  pigment { color Red }
}
*/


Post a reply to this message

From: Warp
Subject: Re: Quiz
Date: 11 May 2000 08:59:43
Message: <391aaebe@news.povray.org>
Actually it's a bit simpler:

union
{ #declare Angle=0;
  #while(Angle<360)
    torus { 1,.04 rotate z*30 translate z*.25 rotate y*Angle }
    #declare Angle=Angle+15;
  #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: Tor Olav Kristensen
Subject: Re: Quiz
Date: 11 May 2000 18:42:08
Message: <391B3738.DD8C695A@online.no>
Warp wrote:

>   Actually it's a bit simpler:
>
> union
> { #declare Angle=0;
>   #while(Angle<360)
>     torus { 1,.04 rotate z*30 translate z*.25 rotate y*Angle }
>     #declare Angle=Angle+15;
>   #end
> }

I knew that it could be done that way.

But I did it my way! =)

Since I'm lazy when it comes to laborious math calculations,
I first defined the important parameters and then let the
macros (which I already had) do the calculations.

And btw:
How would you for instance calculate the dimensions of the
bounded_by shapes if you where to model shapes like the one
I posted in TorusClutter?

For that TorusCluster it was just:

bounded_by { torus { MajR, MinR1 + MinR2 } }
for the "first" level and
bounded_by { torus { MajR, MinR1 + MinR2 + MinR3 } }
for the "second" level

Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

From: Anton Sherwood
Subject: Re: Quiz
Date: 29 Jul 2001 02:25:26
Message: <3B63AD18.85331C3F@pobox.com>
Warp wrote:
> 
>   Actually it's a bit simpler:
> 
> union
> { #declare Angle=0;
>   #while(Angle<360)
>     torus { 1,.04 rotate z*30 translate z*.25 rotate y*Angle }
>     #declare Angle=Angle+15;
>   #end
> }


Slightly simpler: change the relevant line to
torus { 1, 0.04 translate x*0.25 rotate <30,Angle,0> }

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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