|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> So, I worked out my own scene, using your equation, storing the <x, f(r), z> in
> a 2D array, analytically calculating the vertex normals using fast forward
> differencing to get the tangents by numerically approximating the partial
> derivatives, then taking the vector cross product, and then making a mesh with
> smooth_triangles with per-vertex normals.
>
> (After horribly botching that 5 times in a row, I got the normals, and therefore
> the triangles all working nicely.)
>
> No textures for any of the triangles.
>
> mesh {
> loop over arrays to make triangles
> texture {gradient y}
> interior_texture
> }
>
> I get a much steeper curve than you do, so I don't know if there's some kind of
> scaling going on somewhere in the process.
>
> I hard-coded the pigment_map for the texture, but it could probably be
> calculated from the HSV2RGB macro in colors.inc
Looks nice and smooth ! Could you share the code, please ?
I am continue struggle with Matlab's generated data )
Post a reply to this message
|
|