POV-Ray : Newsgroups : povray.general : Sweep Mesh Macro request : Re: Sweep Mesh Macro request Server Time
1 Aug 2024 00:20:19 EDT (-0400)
  Re: Sweep Mesh Macro request  
From: Charles C
Date: 9 Jun 2006 13:50:01
Message: <web.4489b46898b40c82200a56120@news.povray.org>
Wow we think alike!  I'm using a similar strategy on a character I'm working
on.   I think you'll end up with a collectin of re-usable macros as well
ones which are specific to a body part.   I'm using an array of 4d vectors
just like you mentioned.  E.g:


#declare Tail_Array_Lev0_Num0 =
array[23]{
  <0 ,-3.00, 0.10,   -1/20> //tangent
  <0 ,-3.00,-0.00,    0/20> //bottom

  <0 ,-2.95,-1.00,    1/20>
  <0 ,-2.50,-2.00,    2/20>
  <0 ,-1.60,-2.50,    3/20>
  <0 ,-0.50,-2.50,    4/20>
  <0 , 0.25,-2.30,    5/20>

  <0 , 0.85,-1.90,    6/20>
  <0 , 1.40,-1.20,    7/20>
  <0 , 1.70,-0.60,    8/20>
  <0 , 1.82,-0.35,    9/20>

  <0 , 2.00, 0.00,   10/20> //top

  <0 , 1.82, 0.35,   11/20>
  <0 , 1.70, 0.60,   12/20>
  <0 , 1.40, 1.20,   13/20>
  <0 , 0.85, 1.90,   14/20>

  <0 , 0.25, 2.30,   15/20>
  <0 ,-0.50, 2.50,   16/20>
  <0 ,-1.60, 2.50,   17/20>
  <0 ,-2.50, 2.00,   18/20>
  <0 ,-2.95, 1.00,   19/20>

  <0 ,-3.00, 0.00,   20/20> //bottom
  <0 ,-3.00,-0.10,   21/20> //tangent
} // end spline Tail_Array_Lev0_Num0

//Plot_Spline_From_Array(Tail_Array_Lev0_Num0, no, 0, 23, 0, 1, Red, 2)


I've been working slowly on my skeletal system but I just finished that at
the end of May and haven't had a chance to work much since.

Anyway I'll be using:
1. a minimal handful of hand-coded spline cross sections, albeit entered
using arrays of 4d vectors so that they can be oriented to the character's
position and especially the character's spine.
2. a macro which turns an array of 4d vectors into a spline.
3. a macro which creates a spline from a defined point on each of several
other splines. That creates a single longitudinal sline. It can also be
used to create blending-splines from limb to body for example.
4. a macro which loops with calls to the macro defined in #3 to create any
number of longitudinal splines.
5. macros which uses existing spline data to find the orientation of this
surface we're defining to place scales or hair along the longitudinal
splines
6. a simple macro to "lace" any two splines together with a mesh of
triangles, i.e. skin where necessary.
7. special purpose macros to assemble everything.

There will be plenty of special-purpose macros for joining body parts
smoothly.  It'll likely be impractical to pass all the needed information
to a general purpose macro, but we'll see.  Since I'm using an all-bone
based skeletin (my spine is not based on a spline... it happens to have 75
vertebrae counting the head) I won't be sliding splines along other splines
until I start working on teeth horns and toe-nails.


Charles


Post a reply to this message

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