POV-Ray : Newsgroups : povray.general : mesh question : mesh question Server Time
2 Aug 2024 02:24:46 EDT (-0400)
  mesh question  
From: Alf Peake
Date: 4 Feb 2005 15:40:22
Message: <4203ddb6$1@news.povray.org>
How do I select which diagonal to use when converting quads to 2
triangles? I need to use information from 2 adjacent quads? I can't
figure it out :(  Any online suggestions?

The vertices are stored in an array
  #declare Verts = array[N][NPoints+1];

and the quads are extracted (clockwise) in nested loops
  #declare Tp1 = Verts[Count][VPt];
  #declare Tp2 = Verts[Count][VPt+1];
  #declare Tp3 = Verts[Count+1][VPt+1];
  #declare Tp4 = Verts[Count+1][VPt];

TIA

Alf


Post a reply to this message

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