POV-Ray : Newsgroups : povray.general : Feature request (spherize?) : Re: Feature request (spherize?) Server Time
11 Aug 2024 19:39:38 EDT (-0400)
  Re: Feature request (spherize?)  
From: Rune S  Johansen
Date: 17 May 1999 19:21:34
Message: <3740966e.0@news.povray.org>
Nieminen Mika wrote:
>Rune S. Johansen <run### [at] get2netdk> wrote:
>: I would like to see a new new keyword in POV-Ray.
>: If the keyword was spherize [float] the following:
>: box {
>:    <-1,-1,-1>, <+1,+1,+1>
>:    spherize 1.5
>: }
>: should make a rounded box from <-2.5,-2.5,-2.5> to <+2.5,+2.5,+2.5>.
>
>: It should sort of extrude any shape in a spherical way so things get
bigger
>: and rounded.
>
>  You have to first understand how povray works before you can understand
>how easy/difficult this kind of transformation is.
>  It's a fact that povray can only make linear transformations to objects.
>The reason is the following:
>  When povray calculates a transformation, it doesn't actually transform
>the object but the ray which hits the object. For example, if you scale
>the object twice of its original size, the inverse transformation as
actually
>applied to the rays, ie. they are scaled to be twice as small as usual.
>  Why this way? Because objects are only mathemathical entities, not
>physical polygons (perhaps triangle meshes are an exception). Raytracing
>a sphere means actually calculating the intersection between a line and a
>spherical surface (which is only a mathematical formula). Transforming the
>mathematical surface would be a pain, but transforming the line is
extremely
>easy.
>  A ray is a straight line. Linear transformation means that after the
>transformation the ray is still a straight line.
>  Non-linear transformation means that after the transformation the line
>is not straight anymore, but curved. Calculating the intersection between
>a mathematical surface and a curve is extremely difficult (in many cases
>it's impossible without a slow approximation method).

Thank you for you response, you have expanded my knowledge a little :-)

>  What you are suggesting here looks a lot like a non-linear
transformation.

Hmm, I don't know what is called a transformation and what is not. Isn't
turbulence and warps kinds of transformations? Are they linear?

Well, I just thought might be possible to combine the calculation of the
intersection of any object with the intersection of a sphere. I would think
a sphere intersection is made if the ray comes nearer than [radius] units
from the center. The same way a spherized object intersection should be made
if the ray comes nearer than [float] units from any point in the object. But
since I am not a programmer, I don't know if that actually make sense or
not.


P.S.: I have never used anything else than POV-Ray. I have never used a
modeller either. :-)

Greetings,

Rune S. Johansen

---
My POV-Ray 3D Gallery, the POV Desktop Theme,
and the compiled list
"you know you have been raytracing too long when..."
at http://hjem.get2net.dk/rsj


Post a reply to this message

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