POV-Ray : Newsgroups : povray.general : Need help with Isosurface and Predefined Shapes Code Conversion Server Time
1 Nov 2024 03:16:44 EDT (-0400)
  Need help with Isosurface and Predefined Shapes Code Conversion (Message 1 to 3 of 3)  
From: mephuser
Subject: Need help with Isosurface and Predefined Shapes Code Conversion
Date: 22 Jan 2005 09:50:01
Message: <web.41f266d27e8c5a063d54f5180@news.povray.org>
Need help with Isosurface and Predefined Shapes Code Conversion


Sorry, I'm a newbie in Pov-Ray...

//Predefined Shape Code
cylinder{<0,-0.5,0>, <0,0.5,0>, 0.215}
// What does <0,-0.5,0> mean?
// What does 0.215 mean?

//Isosurface Code
isosurface {
  function { y*y + z*z - C*C }
}


Post a reply to this message

From: Jim Holsenback
Subject: Re: Need help with Isosurface and Predefined Shapes Code Conversion
Date: 22 Jan 2005 11:44:01
Message: <41f282d1@news.povray.org>
"mephuser" <nomail@nomail> wrote in message 
news:web.41f266d27e8c5a063d54f5180@news.povray.org...
> Need help with Isosurface and Predefined Shapes Code Conversion
>
>
> Sorry, I'm a newbie in Pov-Ray...
>
> //Predefined Shape Code
> cylinder{<0,-0.5,0>, <0,0.5,0>, 0.215}
> // What does <0,-0.5,0> mean?

 that's base point of the cylinder located around 0 units in the "X" 
dir -0.5 units in the "Y" dir and 0 units in the "Z" dir

> // What does 0.215 mean?

that's the radius ....

BTW: press the F1 key with the cursor located just after the keyword (in 
this case cylinder)


Post a reply to this message

From: Mike Williams
Subject: Re: Need help with Isosurface and Predefined Shapes Code Conversion
Date: 22 Jan 2005 15:23:32
Message: <XsKm0HAkXr8BFwO+@econym.demon.co.uk>
Wasn't it mephuser who wrote:
>Need help with Isosurface and Predefined Shapes Code Conversion
>//Predefined Shape Code
>cylinder{<0,-0.5,0>, <0,0.5,0>, 0.215}
>// What does <0,-0.5,0> mean?
>// What does 0.215 mean?


Try running the following complete scene

The red cylinder is a cylinder.
The green cylinder is an isosurface.
The blue spheres are placed at points <0,-0.5,0> and <0,0.5,0> so you
can see how they relate to the cylinder.
The yellow bar is 0.215 units long, so you can see how that relates to
the cylinder.


global_settings {assumed_gamma 1.0}
camera { location  <0.3, 0, -5> look_at <0.3, 0, 0> angle 20}
background {rgb 1}
light_source {<-100,200,-100> colour rgb 1}

cylinder{<0,-0.5,0>, <0,0.5,0>, 0.215
  pigment {rgb <1,0,0>}
}

isosurface {
  function { x*x + z*z - 0.215*0.215 }
  max_gradient 0.7
  contained_by {box {<-.3,-.5,-.3><.3,.5,.3>}}
  pigment {rgb <0,1,0>}
  translate x*0.6
}

sphere {<0,-0.5,0>,0.04 pigment {rgb <0,0,1>}}
sphere {<0, 0.5,0>,0.04 pigment {rgb <0,0,1>}}

cylinder {<0,0.55,0><0.215,0.55,0>,0.02 pigment {rgb <1,1,0>}}


Post a reply to this message

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