POV-Ray : Newsgroups : povray.newusers : Problems declaring objects : Problems declaring objects Server Time
2 Nov 2024 03:15:52 EDT (-0400)
  Problems declaring objects  
From: Oleguer Vilella
Date: 14 Sep 2004 16:30:41
Message: <414754f1@news.povray.org>
Why if I do this some objects move down?
The code is:

=============The camera==============
#include "colors.inc"
#include "shapes.inc"
#include "stones.inc"
#include "textures.inc"
#include "woods.inc"
#include "metals.inc"
#include "golds.inc"
#include "glass.inc"
#include "glass_old.inc"

global_settings { assumed_gamma 2 }
background { color White }
camera { location <-10, 8, -19> look_at <0, 5, 0> }
light_source { <0, 33, 0> color White spotlight point_at <0, 0, 0> radius 50
falloff 20 tightness 0  }
light_source { <0, 19, 0> color rgb <0.5, 0.5, 0.5> }
light_source { <40, 25, 0> color rgb <1, 1, 1>
spotlight
point_at <0, 5, 0>
radius 20
falloff 20  }
===================================
============The object================
//Inici del relotge.
//Per fer el marc.
#declare Reloj =
union {
  merge {
    box {<-5,0,-55>,<0,95,55>}
    cylinder{<-5,95,0>,<0,95,0>,55}
   texture { T_Wood15 } finish { specular .51 ambient 1 diffuse .96 }
  scale 0.1 no_shadow}
//Per fer l'esfera.
difference {
    cylinder{<-10,95,0>,<20,95,0>,40}
    cylinder{<-11,95,0>,< 6,95,0>,36}
    texture { T_Gold_1D } finish { specular 2 ambient 1 diffuse .07
reflection 0.1 phong 0.3 phong_size 30 }
    scale 0.1}
no_shadow
}
//Per fer els punts dels quarts.
#declare Puntos = union {
sphere { <0, 0, 0>, 0.1 pigment { color White } finish { ambient 1 }
translate <2.1, 9.7, -4> }
sphere { <0, 0, 0>, .1 pigment { color White } finish { ambient 1 }
translate <-5.4, 9.35, -4> }
sphere { <0, 0, 0>, .1 pigment { color White } finish { ambient 1 }
translate <-2.2, 12.6, -4> }
sphere { <0, 0, 0>, .1 pigment { color White } finish { ambient 1 }
translate <-2.2, 6, -4> }
no_shadow
}
//Agulles del relotge.
#declare Agulles = union {
box { <-1, 0, -3.5> <-0.8, .2, 3.5> pigment { color Black } finish { ambient
1 } translate <0, 9.5, -4> rotate <0, 0, 0> no_shadow }
box { <-1, 0, -1> <-0.8, .2, 0.5> pigment { color Black } finish { ambient
1 } translate <1.12, -0.5, -10> rotate <60, 30, 0> no_shadow }
}
//Cilindre que unix les agulles.
#declare Cilindre =
cylinder { <0, 0.9, -0.5> <0, 1, 1> 0.035 texture { T_Gold_1D } finish {
specular 2 ambient 1 diffuse .07 reflection 0.1 phong 0.3 phong_size 30 }
rotate y*25 rotate x*-2 translate <-3.18, 8.25, -6>
}
//Declarant les diverses parts.
#declare Todo_Reloj = union {
object { Reloj rotate y*115 translate <0, 0, 0> }
object { Puntos }
object { Agulles }
object { Cilindre }
}
//Declarant tot junt.
object { Todo_Reloj  no_shadow }
===================================
If I put this on the last line "object { Todo_Reloj scale 0.5 no_shadow }",
some objects change their position. Why??
Can anyone help me?

Thanks in advance,
Oleguer


Post a reply to this message

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