POV-Ray : Newsgroups : povray.general : Newbie Question: a simple polygon in 3D : Re: Newbie Question: a simple polygon in 3D Server Time
3 Aug 2024 04:17:19 EDT (-0400)
  Re: Newbie Question: a simple polygon in 3D  
From: Chris B
Date: 18 Jul 2004 19:10:56
Message: <40fb0380$1@news.povray.org>
<nomail@nomail> wrote in message
news:web.40f83f6530a9f2a0c523eabf0@news.povray.org...
> Tor Olav Kristensen <tor### [at] TOBEREMOVEDhotmailcom> wrote:
> > nomail@nomail wrote:
> >
> > If the number of sampled points from each slice contour
> > is equal, then you can write a little macro that produces
> > triangles that connects each pair of successive slices.
> >
> > (All the triangles can be merged into a mesh.)
> >
> > --
> > Tor Olav
> > http://subcube.net
> > http://subcube.com
>
> Thanks Tor for your response.
> I saw your web-site. The photos were great, but I am still newbie, and
your
> images are very complicated for me...
> Do you have a simple example??.
>
>
>

I think there are lots of ways of rebuilding your mouse.

A simple way of using your data to rebuild a slice would be to use the
points to draw a 2d spline and extrude it as a prism. You could then use
your photo as an image map on the slice to show the organs. You would need
to define 240 prisms to reconstruct your whole mouse.
I've used your data below in an example of two slices, applying an image to
the second. I've made the slices 5 units thick and spaced them 5 units
apart.

I'm not sure if this is quite what you're after, but I hope it might give
you some ideas:


camera {
  location <360, 240, -60>
  look_at <320, 224, 0>
}

light_source { <300, 400, -100>, rgb<1, 1, 1> }

prism {
  linear_sweep
  linear_spline
  0,         // height 1
  5,        // height 2
  84,       // number of points

<346, 224>,
<345, 224>,
<345, 227>,
<344, 227>,
<344, 229>,
<343, 229>,
<343, 231>,
<342, 231>,
<342, 232>,
<341, 232>,
<341, 233>,
<340, 233>,
<340, 234>,
<339, 234>,
<339, 235>,
<337, 235>,
<337, 236>,
<335, 236>,
<335, 237>,
<333, 237>,
<333, 238>,
<324, 238>,
<324, 237>,
<322, 237>,
<322, 236>,
<320, 236>,
<320, 235>,
<318, 235>,
<318, 234>,
<317, 234>,
<317, 233>,
<316, 233>,
<316, 232>,
<315, 232>,
<315, 231>,
<314, 231>,
<314, 229>,
<313, 229>,
<313, 227>,
<312, 227>,
<312, 224>,
<311, 224>,
<311, 215>,
<312, 215>,
<312, 212>,
<313, 212>,
<313, 210>,
<314, 210>,
<314, 208>,
<315, 208>,
<315, 207>,
<316, 207>,
<316, 206>,
<317, 206>,
<317, 205>,
<318, 205>,
<318, 204>,
<320, 204>,
<320, 203>,
<322, 203>,
<322, 202>,
<324, 202>,
<324, 201>,
<333, 201>,
<333, 202>,
<335, 202>,
<335, 203>,
<337, 203>,
<337, 204>,
<339, 204>,
<339, 205>,
<340, 205>,
<340, 206>,
<341, 206>,
<341, 207>,
<342, 207>,
<342, 208>,
<343, 208>,
<343, 210>,
<344, 210>,
<344, 212>,
<345, 212>,
<345, 215>,
<346, 215>
  pigment { rgb <1,1,0>}
  rotate -x*90
}


prism {
  linear_sweep
  linear_spline
  10,         // height 1
  15,         // height 2
  92,         // number of points
<346, 224>,
<345, 224>,
<345, 227>,
<344, 227>,
<344, 229>,
<343, 229>,
<343, 231>,
<342, 231>,
<342, 232>,
<341, 232>,
<341, 233>,
<340, 233>,
<340, 234>,
<339, 234>,
<339, 235>,
<338, 235>,
<338, 236>,
<337, 236>,
<337, 237>,
<335, 237>,
<335, 238>,
<332, 238>,
<332, 239>,
<324, 239>,
<324, 238>,
<321, 238>,
<321, 237>,
<319, 237>,
<319, 236>,
<318, 236>,
<318, 235>,
<317, 235>,
<317, 234>,
<316, 234>,
<316, 233>,
<315, 233>,
<315, 232>,
<314, 232>,
<314, 231>,
<313, 231>,
<313, 229>,
<312, 229>,
<312, 227>,
<311, 227>,
<311, 224>,
<310, 224>,
<310, 214>,
<311, 214>,
<311, 211>,
<312, 211>,
<312, 209>,
<313, 209>,
<313, 207>,
<314, 207>,
<314, 206>,
<315, 206>,
<315, 205>,
<316, 205>,
<316, 204>,
<317, 204>,
<317, 203>,
<318, 203>,
<318, 202>,
<319, 202>,
<319, 201>,
<321, 201>,
<321, 200>,
<324, 200>,
<324, 199>,
<332, 199>,
<332, 200>,
<335, 200>,
<335, 201>,
<337, 201>,
<337, 202>,
<338, 202>,
<338, 203>,
<339, 203>,
<339, 204>,
<340, 204>,
<340, 205>,
<341, 205>,
<341, 206>,
<342, 206>,
<342, 207>,
<343, 207>,
<343, 209>,
<344, 209>,
<344, 211>,
<345, 211>,
<345, 214>
<346, 214>

  texture {
    pigment {
      image_map {
        png "plasma3.png"
        map_type 0
        interpolate 2
      }
        scale 100
    }

  }

  rotate -x*90
}


Post a reply to this message

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