POV-Ray : Newsgroups : povray.newusers : help filling in the gaps : help filling in the gaps Server Time
30 Jul 2024 18:10:34 EDT (-0400)
  help filling in the gaps  
From: Thomas Barnes
Date: 24 Oct 2003 17:46:33
Message: <3f999db9@news.povray.org>
Hi,
 Here is a question that I thought would be easy. . but it is not and now my
mind is in a intersection-difference loop :)

little history:
I compiled a little program, that I got out of a book some years ago, that
makes a little puzzle. I modified it to export to povray but seemed to be
missing the intersection that fills in the gaps < see thumbnail >

it is a collection of spheres and cylinders to make an array of trapezoids.

My problem is filling in the centers.

My idea is to difference 2 planes and take that and add it back. . just
seems like it is not the most efficient way

Any ideas?

here is the snippets of code to make one trapezoid:

#declare trpzd = union {
  sphere {
    <0,0,0>,1
    scale 0.1
    translate  <0.1, 0.1, 0.0>
  }
  sphere {  <0,0,0>,1
    scale 0.1
    translate  <0.1, 0.9, 0.0>
  }
  sphere {   <0,0,0>,1
    scale 0.1
    translate  <0.90119, 0.89002, 0.0>
  }
  sphere {   <0,0,0>,1
    scale 0.1
    translate  <0.9, 0.1, 0.0>
  }
  cylinder {  <0,0,1>, <0,0,0>, 1
    scale <0.1, 0.1, 0.8>
    rotate 90.0*y
    translate  <0.1, 0.1, 0.0>
  }
  cylinder {   <0,0,1>, <0,0,0>, 1
    scale <0.1, 0.1, 0.8>
    rotate 270.0*x
    translate  <0.1, 0.1, 0.0>
  }
  cylinder {   <0,0,1>, <0,0,0>, 1
    scale <0.1, 0.1, 0.790021>
    rotate <89.913696, 270.000214, 0.0>
    translate  <0.90119, 0.89002, 0.0>
  }
  cylinder {  <0,0,1>, <0,0,0>, 1
    scale <0.1, 0.1, 0.801252>
    rotate <359.286346, 270.0, 0.0>
    translate  <0.90119, 0.89002, 0.0>
  }
}


  object { trpzd
  material {
    T_Grnt19
  }
   }


Post a reply to this message


Attachments:
Download 'puzzle-test.JPG' (38 KB)

Preview of image 'puzzle-test.JPG'
puzzle-test.JPG


 

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