POV-Ray : Newsgroups : povray.programming : SOLID : Re: SOLID Server Time
28 Jul 2024 22:16:43 EDT (-0400)
  Re: SOLID  
From: Alain CULOS
Date: 21 Mar 1999 13:52:34
Message: <36F3EE6A.A4E08F60@bigfoot.com>
Sorry tommaso, I don't have the answer and I am not able to speak
proper italian.
Yet I understand some of it and I will translate your query here.



Tommaso is asking how he could define a solid - sort of - box by its 8
corners.
He does not want a box as it is not flexible enough : only 2 opposite
points + scale
He does not want the union of six polygons.

He did not say so but I guess he wants to use this for CSG, but maybe
not.

If it is for CSG, my answer is it is not possible.
If it is not for CSG my answer would be to use Bezier patches, I have
not tested completely what follows but it should really be something
very close to that (beware, you have to add a texture to that) :

#macro OneFace (a,b,c,d)
//  a = top left
//  b = top right
//  c = bottom right
//  d = bottom left

#local ad=a+(d-a)/3;
#local ab=a+(b-a)/3;
#local ba=b+(a-b)/3;
#local bc=b+(c-b)/3;
#local cb=c+(b-c)/3;
#local cd=c+(d-c)/3;
#local dc=d+(c-d)/3;
#local da=d+(a-d)/3;

#local abd=(a+b+d)/3;
#local bac=(b+a+c)/3;
#local cbd=(c+b+d)/3;
#local dac=(d+a+c)/3;

bicubic_patch
{
  type     1
  flatness 0
  u_steps  4
  v_steps  4,
  a,  ab,  ba,  b,
  ad, abd, bac, bc,
  da, dac, cbd, cb,
  d,  dc,  cd,  c
}
#end

#macro Solid (a,b,c,d,e,f,g,h)
//  a = top left front
//  b = top right front
//  c = bottom right front
//  d = bottom left front
//  e = top left back
//  f = top right back
//  g = bottom right back
//  h = bottom left back

  OneFace(a,b,c,d) // front
  OneFace(b,f,g,c) // right
  OneFace(e,f,b,a) // up
  OneFace(f,e,h,g) // back
  OneFace(e,a,d,h) // left
  OneFace(d,c,g,h) // down

#end

tommaso wrote:

> con il POVRAY
>
> voglio disegnare un SOLIDO con 8 vertici
> come fare?
>
> NON   con la "box" (2 punti opposti) e poi con "scale"
> NON   con "union" di 6 polygons
>
> Ma solo introducendo le coordinate di 8 punti generici.
>
> Grazie
>
> Tommaso
>
> Tst### [at] capoleucait

--
ANTI SPAM / ANTI ARROSAGE COMMERCIAL :

To answer me, please take out the Z from my address.


Post a reply to this message

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