|
|
"Josh" <nomail@nomail> wrote:
> 1) I would love to use the example from Inigo Quilez about rounding. Say I have
> a simple function for a box used in an isosurface. How would I implement his
> idea in povray to make the corners round? I tried changing the threshold of the
> isosurface, but that doesn't do it. A simple example would be super helpful.
http://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm
float sdBox( in vec2 p, in vec2 b )
{
vec2 d = abs(p)-b;
return length(max(d,0.0)) + min(max(d.x,d.y),0.0);
}
It may take some fiddling to get the vectors that ShaderToy allows you to use in
its functions into a POV-Ray function.
#declare PX = VecP.x;
And then you can use PX in the function.
> 2) I also like how you can create df3 files and use them as a function from the
> warp example. Is there any 3d modelers that can export df3? Are there other
> programs/ways to create simple df3 files of simple shapes?
There should be a function to make a df3 from POV-Ray.
http://wiki.povray.org/content/Reference:Arrays.inc
Arrays.incReference
This file contains macros for manipulating arrays.
ARRAYS_WriteDF3(Array, FileName, BitDepth): Write an array to a df3 file.
Parameters:
Array = The array that contains the data.
FileName = The name of the file to be written.
BitDepth = The size of the binary word.
Note: See the #write directive for more information.
I would have gotten to this sooner, and maybe wrote out some more detailed help,
but I spent all day writing and developing Arduino code in cpp proper.
I still have one or two things to do that I don't quite understand. ;)
But this should get you going if you play with it a bit.
https://www.desmos.com/calculator
Post a reply to this message
|
|