POV-Ray : Newsgroups : povray.general : the trace function and toroidal objects : Re: the trace function and toroidal objects Server Time
3 Aug 2024 22:16:54 EDT (-0400)
  Re: the trace function and toroidal objects  
From: Christopher James Huff
Date: 30 Sep 2003 16:47:07
Message: <cjameshuff-670827.16463330092003@netplex.aussie.org>
In article <oprwbppd0lmulnlm@localhost>, melundbe@mtu.edu wrote:

> I'm trying to slap randomly distributed objects onto an isosurface in the 
> shape of a lumpy torus.  The only tool that I've found to help is the 
> trace(OBJECT_IDENTIFIER, A, B, [VECTOR_IDENTIFIER]) function.  
> Unfortunately, it only returns points on the "outside" part of the torus 
> (ie. not inside the donut hole).  Is there any way I can make it trace to 
> the entire torus?  Is there another function or macro that will do the 
> job?

All you have to do is point it at part of the surface inside the hole. 
The trace() function will return the first intersection with the 
specified ray, no matter where on the surface it is. Given your 
description, I'm guessing you are shooting at the center of the torus 
from random positions outside of it...this obviously won't hit anything 
inside the torus.


> I can put the objects in a regular torus through some inventive vector 
> math, but conquering the lumpiness is beyond my abilities, it seems.

Not sure what lumpiness you mean. The distribution will not be even, but 
that's nothing I'd describe as lumpy.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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