|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Hello, there.  This is actually my second time posting, so no reflecting 
spheres today.
I was just playing around last night and did this nice little image with 
the trace function, nested loops and spherical coordinates.  Basically, its 
just a bunch of cylinders placed on a sphere.  Actually, 80800 cylinders.  
Hope you enjoy it.  Took an hour to render...  Just an area light and focal 
blur.
Matt Leonard
 Post a reply to this message
 Attachments:
 Download 'cylsphere.jpg' (118 KB)
 
 
 Preview of image 'cylsphere.jpg'
  
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | mcl### [at] ksu edu news:opr6h4uoo5vka4sj@news.povray.org
> Hello, there.  This is actually my second time posting, so no
> reflecting spheres today.
Simple image, but artistic effect is interesting :)
-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | I really like that grey, shiny look!
What formula did you use for tracing?  For a sphere, it wouldn't be
necessary to use trace at all, of course, but now that you have ... I wonder
if you also used some interesting formula for tracing all around the object
in question.
Regards,
Hugo
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Cool idea!
I like the simple look of the image. The focal blur looks a bit grainy 
though.
Florian
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | On Thu, 15 Apr 2004 22:46:59 +0200, Hugo Asm <hua### [at] post3 tele  dk> wrote:
> I really like that grey, shiny look!
>
> What formula did you use for tracing?  For a sphere, it wouldn't be
> necessary to use trace at all, of course, but now that you have ... I 
> wonder
> if you also used some interesting formula for tracing all around the 
> object
> in question.
>
> Regards,
> Hugo
>
>
>
Basically all I did was trace out a sphere with the start of the trace 
function.  Ummm...  when using spherical coordinates, you can describe a 
sphere easily with three parameters, the radius, theta - the angle around 
the vertical axis, and phi - the angle with respect to the horizontal 
plane.  I just took one theta and moved phi down, scanning across the 
surface of the sphere and placing cylinders.  Then it increments theta, and 
scans down again.  Do this a bunch of times and you end up with the 
picture.  Code looks like this:
#while ( theta < 2*pi )
    #local phi = 0;   #while ( phi < pi )      #local vary = rand(seed1);
      #local Start = <r*sin(phi)*sin(theta), r*cos(phi), r*sin(phi) 
*cos(theta)>;  #local Inter = trace ( S, Start, <0,0,0> - Start, Norm ); 
cylinder { Inter, Inter + Norm*vary*.5, .025
      }
      #local phi = phi + pi/Number;
    #end
    #local theta = theta + 2*pi/Number;
  #end
Probably more complicated than it needs to be, but whatever....
Thanks for the comments! Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Uhhh...  the code didn't come out right...
#while ( theta < 2*pi )
#local phi = 0;   #while ( phi < pi )
#local vary = rand(seed1);
#local Start = <r*sin(phi)*sin(theta), r*cos(phi), r*sin(phi)*cos(theta)>;
#local Inter = trace ( S, Start, <0,0,0> - Start, Norm );
cylinder { Inter, Inter + Norm*vary*.5, .025
texture { T_Chrome_2B } }
#local phi = phi + pi/Number;
#end
#local theta = theta + 2*pi/Number;
#end
Does this work?
Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Matt Leonard wrote:
> Hello, there.  This is actually my second time posting, so no reflecting 
> spheres today.
> 
> I was just playing around last night and did this nice little image with 
> the trace function, nested loops and spherical coordinates.  Basically, 
> its just a bunch of cylinders placed on a sphere.  Actually, 80800 
> cylinders.  Hope you enjoy it.  Took an hour to render...  Just an area 
> light and focal blur.
> 
> Matt Leonard
Excellent feeling of depth!!!
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Thanks for posting the code!
> Probably more complicated than it needs to be,
> but whatever....
Yes and no. If your loops are shooting rays from origin and outwards in a
spherical pattern, the trace function is superflous. You just need a length
parameter to act as stop condition.
Regards,
Hugo
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Very Nice, I like it, how about spheres on a cylinder!
"Matt Leonard" <mcl### [at] ksu edu> wrote in message
news:opr6h4uoo5vka4sj@news.povray.org...
> Hello, there.  This is actually my second time posting, so no reflecting
> spheres today.
>
> I was just playing around last night and did this nice little image with
> the trace function, nested loops and spherical coordinates.  Basically,
its
> just a bunch of cylinders placed on a sphere.  Actually, 80800 cylinders.
> Hope you enjoy it.  Took an hour to render...  Just an area light and
focal
> blur.
>
> Matt Leonard
> Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  |