POV-Ray : Newsgroups : povray.pov4.discussion.general : Feature Re-requests - Normal Map and Displacement Map Support : Re: Feature Re-requests - Normal Map and Displacement Map Support Server Time
4 May 2024 00:52:43 EDT (-0400)
  Re: Feature Re-requests - Normal Map and Displacement Map Support  
From: Nicolas Alvarez
Date: 2 Feb 2008 08:40:18
Message: <47a472c2@news.povray.org>

> BTW, speaking of requests, perhaps it should be useful to allow for the simple
> geometric shapes to be treated as isosurfaces in syntax.

I'd like to have some way to get an isosurface function from primitives 
(including complex CSG). That way we could easily make a complex object 
using the normal syntax (instead of something like isoCSG), and then use 
it inside a isosurface function.

In the C++ code, each object would have 'trace ray', 'is point inside 
shape', etc. and a new 'get isosurface function'. Of course it would be 
impossible or very hard to implement for some objects (like text or 
julia_fractal).

#declare SomeShape = difference {
     sphere { <0,0,0>, 1 }
     cylinder { -x*2, x*2, 0.5 }
}
isosurface {
     function { object_function(SomeShape, x-0.5, z, y)*(1-clock) + 
object_function(SomeShape, x+0.5, y, z)*clock }
     ...
}

Of course you could also use:

#declare Fn = object_function(SomeShape, x, y, z);
isosurface {
     function { Fn(x-0.5, z, y)*(1-clock) + Fn(x+0.5, y, z)*clock }
     ...
}

Which is shorter code.

Producing:
http://stuff.povaddict.com.ar/pov/iso.avi (XviD)


Post a reply to this message

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