POV-Ray : Newsgroups : povray.general : Mesh rendering artifacts : Re: Mesh rendering artifacts Server Time
24 Apr 2024 21:55:31 EDT (-0400)
  Re: Mesh rendering artifacts  
From: Bald Eagle
Date: 30 Jan 2023 19:05:00
Message: <web.63d85a77249f00761f9dae3025979125@news.povray.org>
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


Post a reply to this message


Attachments:
Download 'ripple.png' (768 KB)

Preview of image 'ripple.png'
ripple.png


 

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