POV-Ray : Newsgroups : povray.binaries.images : Mesh leg bones : Re: Mesh leg bones Server Time
30 Jul 2024 04:23:21 EDT (-0400)
  Re: Mesh leg bones  
From: Bald Eagle
Date: 11 Aug 2013 21:10:01
Message: <web.520835d7975c0a2f45338b700@news.povray.org>
So, I have my bones all separated and renderable as mesh objects.

It appears I can "slice" it once, with a plane, but not twice.
Nor can I intersect or difference the mesh bone with a thin box object.

What gives?
Do I need to upgrade from 3.6 to 3.7?
Do I need some sort of include file to be able to intersect objects?


global_settings {   max_trace_level 15}

#include "colors.inc"
#include "textures.inc"
#include "metals.inc"
#include "woods.inc"
#include "stones1.inc"
#include "debug.inc"
#include "shapes.inc"
#include "functions.inc"

Set_Debug (true)

camera {
//        perspective
 //       up <0,1,0>
        right -x*image_width/image_height

   location <40, 35, 100>
        look_at  <40, 35, 0>
}


light_source {
              <0, 0, 300> //light position
              color rgb <1,1,1>*1.6
              parallel
              point_at <0, 0, 0>
              rotate <0,0,0> //roll
              rotate <-25,0,0> //elevation
              rotate <0,45,0> //rotation
             }

//Background
background { color Gray80  }

//######################################################################################

#include "Tibia.inc"

cylinder {<-50, 0, 0>, <50, 0, 0>, 0.5  pigment { color Red} }
cylinder {<0, -50, 0>, <0, 50, 0>, 0.5  pigment { color Green} }
cylinder {<0, 0, -50>, <0, 0, 50>, 0.5  pigment { color Blue} }

// Tibia
#declare Tibia = difference {
object{Tibia_Scan scale 1.2}
object{Tibia_Scan scale 0.8}
translate <-6, -14, 20>
}


#declare MinTibia = min_extent ( Tibia );
#declare MaxTibia = max_extent ( Tibia );
#declare Level = 0;
#declare Slice = (MaxTibia.y-MinTibia.y)/100;
#declare Slices = on;

#macro Divvy (Level, Slice)
#local Level = 0;
#local Color = 1;
#local Slice = (MaxTibia.y-MinTibia.y)/100;

#while (Level*Slice <= MaxTibia.y)

 #if (Color = 1)
 #local Texture = texture { pigment {color Blue}};
 #else
 #local Texture = texture { pigment {color Green}};
 #end

#local INT = difference {
object {  Tibia }
plane {y, Level*Slice inverse}
plane {y, (Level+1)*Slice}
}

object {INT texture {Texture}
//rotate y * (Level)
translate x*10*Color
}

#declare Color = Color * -1;
#declare Level = Level + 1;
#end // end while
#end // end macro

#if (Slices)

Divvy (Level, Slice)

#else
//object { Tibia texture { pigment {color Green}} }
difference { object { Tibia texture { pigment {color Green}} }  plane {y, 25
inverse} }// keeps bottom

#end // end if


Post a reply to this message


Attachments:
Download 'bone_rotate.png' (7 KB)

Preview of image 'bone_rotate.png'
bone_rotate.png


 

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