POV-Ray : Newsgroups : povray.binaries.images : "Meshyfied" Bezier patch (116KB) : Re: "Meshyfied" Bezier patch (116KB) Server Time
16 Aug 2024 08:15:24 EDT (-0400)
  Re: "Meshyfied" Bezier patch (116KB)  
From: Tor Olav Kristensen
Date: 7 Mar 2002 18:27:10
Message: <3C87F509.6BB43E98@hotmail.com>
Christoph Hormann wrote:
> 
> Tor Olav Kristensen wrote:
> >
> > [...]
> > Since there is a long mesh2{} discussion
> > going on here in this group at the
> > moment, I thought that I should try to
> > make a macro that would output a mesh2
> > when given 3 parametric functions like
> > those my bezier patch macro outputs.
> >
> > And it seems that it works quite ok.
> >
> 
> You know ingo already made a macro for converting parametrics into meshes?
> 
> news://news.povray.org/Xns915C94A8BA293seed7@povray.org
> http://www.econym.demon.co.uk/isotut/param.htm

Yes, I noticed that once while visiting
Mike's nice online iso-tutorials.

But I just had to try to do it my way.

I don't like the idea of passing
globally declared macros or functions
to macros as parameters.

Instead I prefer declarations like this:

#declare ContolPoints =
array[5][10] {
  { <1, 3, -3>, ... <2, -6, 0> }
  .
  .
  .
  { <-4, 2, 7>, ... <-1, -1, 5> }
}


object {
  ParametricMesh(
    BezierPatchFunction(CtrlPoints, x),
    BezierPatchFunction(CtrlPoints, y),
    BezierPatchFunction(CtrlPoints, z),
    <0, 0>, <1, 1>, <30, 30>
  )
  texture {
    uv_mapping
    pigment {
      image_map {
        png "someimage"
        map_type 0
        interpolate 2
      }
    }
  }
}


Tor Olav


Post a reply to this message

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