POV-Ray : Newsgroups : povray.binaries.images : PoV modeling : Re: PoV modeling Server Time
16 Aug 2024 14:25:00 EDT (-0400)
  Re: PoV modeling  
From: Hugo
Date: 4 Mar 2002 17:01:32
Message: <3c83eebc@news.povray.org>
> I attached a piece of wire frame to show what I'm talking about.

This really shows what you've done.. great work..  :o)

> I wrote a macro that takes an n-by-n array (mesh_array[columns][rows]) and
> writes out a #mesh2 macro with normals. If this would help with your
> heightfield work, I would be glad to clean it up and send it to you
tonight.
> Let me know.

I too have attached a picture that hopefully demonstrates what I'm doing..
It's a heightfield (a bit boring one) traced within POV.. The idea is that
people can use my macros as modelling tools.. People may use well-known and
easy primitives to make a shape.. My macro will then transform it to a
heightfield, and another macro will smooth out the vertices (remove hard
edges that primitives usually have) and a third macro sweeps the grid around
a lathe, spline, etc.. It will be easy to put in a forth or fifth macro,
with other deformation features.

Each square in the grid consist of 2 triangles. As shown with yellow and
blue lines, these "qaud faces" (double faces) are connected in either one
way - the way that suits the curvature best.. Ordinary HF's don't seem to
have this feature, but it improves the shape when there's not a lot of
triangles.

My problem is to average the normals in this "matrix".. Each vertex is
surrounded by 4 squares, and each square consist of 2 triangles, but
sometimes only 1 of them should be averaged because only 1 of them are
directly connected to the vertex.. It's no problem to store this pattern in
an array with either 0 or 1.. But I battle to get this averaging to work
correctly.. Buggy code and it may sound rediculous.. But I'd like to get it
working.

Your code does not take this swapping of quad-faces into consideration, so
it won't solve my problem.  :o)  But thanks for your offer, anyway!  I don't
know if you could use my long explanation to anything, I tried to be
concise, and anyone is welcome to take a look at my code, of course.

Regards,
Hugo


Post a reply to this message

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