POV-Ray : Newsgroups : povray.binaries.images : Tetrahedral planetoid : Re: Tetrahedral planetoid Server Time
29 Apr 2024 10:58:03 EDT (-0400)
  Re: Tetrahedral planetoid  
From: Le Forgeron
Date: 12 Jun 2019 13:39:28
Message: <5d0138d0$1@news.povray.org>
Le 12/06/2019 à 02:14, Bald Eagle a écrit :
> How about some cloud cover?
> 
> I ran across
> http://abx.art.pl/pov/patches/f_triangle.php
> 
> and that might be adaptable to a tetrahedral shape to make cloud media...
> 

the code computes the distance of the point to the nearest edge defined
by the 3 points (on an oriented triangle, projecting on the plane of the
triangle first).

For tetrahedral adaptation, you would need to compute the distance of
the point to the nearest plane defined by each set of 3 points.
(actually, oriented planes, one side of each plane is to be ignored)

The performance problem here, due to the lack of dedicated data
structure, is already that each evaluation need to recompute again and
again the same pieces of data that are not dependant on the evaluated
point P(x,y,z)

It's going to be worse with distance to planes if the input is user
friednly (such as 4 points) instead of précomputed 4 planes (4 normals &
4 offsets).

And do not forget a last value, the thickness (actually offset for the
result).

But as provided, the process is still doable in code of 3.8 (just adapt
to the new structures/filenames).

Maybe defining pattern/pigment is easier (and faster for the VM), via
function{ pigment/pattern { ... }}, as a pigment can have precomputed
data in its own storage. (so input can be 4 points & thickness, and the
pigment precomputes its data).

It would be a pigment like boxed, but with an explicit tetrahedron and a
thickness. Due to thickness, a fixed tetrahedron and a transform is not
suitable.


Looking at the code, parser/parser_materials.cpp, it seems there is a
bit of todo for square & triangular , it should be similar to checker &
hexagon but so far they are rejected.


Post a reply to this message

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