|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
The post title is really my question this time:
How do you get uneven scaling on the Y-Axis? See, what I'm trying to do (to
sort of introduce myself to POV-Ray) is make a Go board. If you don't know
what Go is, go to http://www.pandanet.co.jp/English/ The pieces for go are
essentially spheres, but they have flat bottoms, sort of like mancala
pieces. I'm supposing it is possible to do in POV-Ray but I don't know
how. Can anyone help me out on this?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> The post title is really my question this time:
>
> How do you get uneven scaling on the Y-Axis? See, what I'm trying to
> do (to sort of introduce myself to POV-Ray) is make a Go board. If
> you don't know what Go is, go to http://www.pandanet.co.jp/English/
> The pieces for go are essentially spheres, but they have flat bottoms,
> sort of like mancala pieces. I'm supposing it is possible to do in
> POV-Ray but I don't know how. Can anyone help me out on this?
Look through the archives on these newsgroups. Goban are very popular
topics for POVers.
--
There may come a time The open palm of desire,
When I will lose you, ]http://surreal.istic.org/[ The rose of Jericho,
Lose you as I lose my sight, Soil as soft as Summer,
Days falling backward into velvet night; The strength to let you go.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Potato Man wrote:
> The post title is really my question this time:
>
> How do you get uneven scaling on the Y-Axis?
Not at all - uneven scaling would be a nonlinear transform and this
isn't possible in a raytracer. See
http://tag.povray.org/povQandT/languageQandT.html#bending
for details.
> See, what I'm trying to do (to
> sort of introduce myself to POV-Ray) is make a Go board. If you don't know
> what Go is, go to http://www.pandanet.co.jp/English/ The pieces for go are
> essentially spheres, but they have flat bottoms, sort of like mancala
> pieces. I'm supposing it is possible to do in POV-Ray but I don't know
> how. Can anyone help me out on this?
I seriously doubt Go pieces are in fact continuously unevenly scaled
spheres - if they were it would be quite difficult to create the forms
to manufacture them. More likely they are composed from a differently
scaled upper and lower half - you can do this with CSG in POV-Ray.
Christoph
--
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <dcgb8r$1e$1@chho.imagico.de>,
Christoph Hormann <chr### [at] gmxde> wrote:
::Potato Man wrote:
::> The post title is really my question this time:
::>
::> How do you get uneven scaling on the Y-Axis?
::
::Not at all - uneven scaling would be a nonlinear transform and this
::isn't possible in a raytracer. See
::
::http://tag.povray.org/povQandT/languageQandT.html#bending
::
::for details.
::
::> See, what I'm trying to do (to
::> sort of introduce myself to POV-Ray) is make a Go board. If you don't know
::> what Go is, go to http://www.pandanet.co.jp/English/ The pieces for go are
::> essentially spheres, but they have flat bottoms, sort of like mancala
::> pieces. I'm supposing it is possible to do in POV-Ray but I don't know
::> how. Can anyone help me out on this?
::
::I seriously doubt Go pieces are in fact continuously unevenly scaled
::spheres - if they were it would be quite difficult to create the forms
::to manufacture them. More likely they are composed from a differently
::scaled upper and lower half - you can do this with CSG in POV-Ray.
::
::Christoph
you are right christoph but a first approximation for a newbie can be :
sphere { pos, radius scale <1, 0.10, 1> }
klp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Christoph Hormann who wrote:
>Potato Man wrote:
>> The post title is really my question this time:
>>
>> How do you get uneven scaling on the Y-Axis?
>
>Not at all - uneven scaling would be a nonlinear transform and this
>isn't possible in a raytracer. See
It is, however, quite easy in POV to perform non-linear transformations
on isosurfaces. The original poster wants to perform the non-linear
transformation on a sphere, so there's no problem creating an isosurface
to apply the non-linear transformation to.
#declare Sphere = function {x*x + y*y + z*z - 1}
isosurface {
function { Sphere(x,y*(2.5-y*0.8),z) }
max_gradient 4
contained_by{sphere{0,1}}
pigment {rgb 1}
}
Adjust the "2.5" to change the overall vertical scale.
Adjust the "0.8" to change how much the top differs from the bottom.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Williams wrote:
>
> It is, however, quite easy in POV to perform non-linear transformations
> on isosurfaces. The original poster wants to perform the non-linear
> transformation on a sphere, so there's no problem creating an isosurface
> to apply the non-linear transformation to.
>
>
> #declare Sphere = function {x*x + y*y + z*z - 1}
>
> isosurface {
> function { Sphere(x,y*(2.5-y*0.8),z) }
> max_gradient 4
> contained_by{sphere{0,1}}
> pigment {rgb 1}
> }
>
> Adjust the "2.5" to change the overall vertical scale.
> Adjust the "0.8" to change how much the top differs from the bottom.
>
Although it will be quite a bit faster if you use the internal function
f_sphere(). Using a minimum size box container could also be more
efficient.
:-)
Christoph
--
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Christoph Hormann who wrote:
>Mike Williams wrote:
>>
>> It is, however, quite easy in POV to perform non-linear transformations
>> on isosurfaces. The original poster wants to perform the non-linear
>> transformation on a sphere, so there's no problem creating an isosurface
>> to apply the non-linear transformation to.
>>
>>
>> #declare Sphere = function {x*x + y*y + z*z - 1}
>>
>> isosurface {
>> function { Sphere(x,y*(2.5-y*0.8),z) }
>> max_gradient 4
>> contained_by{sphere{0,1}}
>> pigment {rgb 1}
>> }
>>
>> Adjust the "2.5" to change the overall vertical scale.
>> Adjust the "0.8" to change how much the top differs from the bottom.
>>
>
>Although it will be quite a bit faster if you use the internal function
>f_sphere().
That gives a speed increase of about 6%. (It's hard to be exact because
it's highly dependent on the values of max_gradient, which are not the
same in the two cases. The max_gradient values suggested by POV vary
slightly depending on the exact details of the scene)
> Using a minimum size box container could also be more
>efficient.
As it happens, that doesn't give any speed improvement at all, and
actually makes it run slower if you don't adjust the max_gradient to the
lower value that POV suggests when using the box container.
But actually, that tells us that we can get away with this lower value
of max_gradient when using a spherical container, because the highest
gradient that POV finds inside the sphere must be well outside the
surface. That gives a speed increase of about 13%.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Williams wrote:
>>
>>Although it will be quite a bit faster if you use the internal function
>>f_sphere().
>
>
> That gives a speed increase of about 6%. (It's hard to be exact because
> it's highly dependent on the values of max_gradient, which are not the
> same in the two cases. The max_gradient values suggested by POV vary
> slightly depending on the exact details of the scene)
Of course they do - they are estimations based on the performed function
evaluations.
The real gradient of the f_sphere() function is constant and exactly one
- the non-uniform scaling of course changes that. The gradient of your
function is non-constant and much larger in some parts of the container.
So using the internal f_sphere() function instead of your variant is
especially efficient if you use a too large container like in your code.
Christoph
--
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |