POV-Ray : Newsgroups : povray.newusers : looking for an object-type with four corners : Re: looking for an object-type with four corners Server Time
30 Jun 2024 14:46:56 EDT (-0400)
  Re: looking for an object-type with four corners  
From: folkert
Date: 22 Jul 2011 17:30:01
Message: <web.4e29eb55534cf3cde70ca0910@news.povray.org>
for(ystep=0; ystep<4; ystep++)
 {
  for(xstep=0; xstep<4; xstep++)
  {
   double u=xstep/3.0;
   double v=ystep/3.0;
   double x=(x1*(1-v)+x4*v)*(1-u)+(x2*(1-v)+x3*v)*u;
   double y=(y1*(1-v)+y4*v)*(1-u)+(y2*(1-v)+y3*v)*u;
   double z=(z2*(1-v)+z4*v)*(1-u)+(z2*(1-v)+z3*v)*u;
   printf("%f,%f,%f\t", x, y, z);
  }
  printf("\n");
 }


Post a reply to this message

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