|
![](/i/fill.gif) |
In article <39964397.4C636C6C@pobox.com>, Anton Sherwood
<bro### [at] pobox com> wrote:
> Rune asked for a "function" equivalent to a given cone. What about
> having this mean a function of the angle between the point in question,
> the tip of the cone and the axis of the cone, ranging from 0 (axis,
> outside) to 1 (axis, inside), adjusted so that a point on the surface of
> the cone has function value 1/2 ?
The equation for a cone is actually simpler, just the equation for a
cylinder with the radius variable along the axis of the cone, like:
function {((Ra - Rb)*y + Rb) - sqrt(sqr(x) + sqr(z))}
(threshold value of 0, Ra is upper radius, Rb is lower radius)
You just have to clip it to the right length(possibly using the &
operator with two plane functions, or by just using the container
object). No trig functions are necessary. It is probably a good idea to
keep it axis-aligned, this makes some displacements easier to do,
simplifies the function, and is faster.
But what I think Rune wants is a way to use objects in isosurfaces
*without having to write the functions*. This would be difficult, it
would require adding density functions to objects which don't have them,
and would probably use a syntax similar to the pigment functions. An
alternative would be to use the proximity pattern, though it really
isn't very useable for this purpose in it's current state. You might
also be able to use the blob pattern, there may be some modifications
which would make it more useful for this.
--
Christopher James Huff - Personal e-mail: chr### [at] mac com
TAG(Technical Assistance Group) e-mail: chr### [at] tag povray org
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |