POV-Ray : Newsgroups : povray.binaries.images : CSG and matrix. : Re: CSG and matrix. Server Time
25 Apr 2024 19:11:32 EDT (-0400)
  Re: CSG and matrix.  
From: LanuHum
Date: 6 Oct 2019 01:40:01
Message: <web.5d997d868913137851e1b25f0@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> "LanuHum" <Lan### [at] yandexru> wrote:
> > Hello! I never learned to speak English, but I have to ask. :)
> > I create an object CSG. Coordinates not in center
>
> Now: apply csg
> #declare data_Box_shape_ob = box { -1, 1
> texture {Default_texture}
>     matrix <1.000000, 0.000000, 0.000000,  0.000000, 1.000000, 0.000000,
> 0.000000, 0.000000, 1.000000,  0.000000, 7.976446, 0.000000>
> }
> #declare data_Lathe_shape_ob = lathe { bezier_spline 4,
> <0,1><0.5,0.5><0,0><0,-1>
> texture {Default_texture}
>     matrix <4.859933, 0.000000, 0.000000,  0.000000, 4.859933, 0.000000,
> 0.000000, 0.000000, 4.859933,  0.000000, 6.200044, 0.000000>
> }
> #declare data_Box_shape_csg =
> difference {
> object {data_Box_shape_ob}
> object {data_Lathe_shape_ob}
> }

Now:
#version 3.7;

#include "functions.inc"
#include "shapes.inc"

global_settings {
    assumed_gamma 1.000000
    max_trace_level 3
    charset utf8
}
sky_sphere {
    pigment {rgb<0.051, 0.051, 0.051>}
}

#declare Default_texture = texture{pigment {rgb 0.8}}

#declare data_Box_shape_ob = box { -1, 1
    texture {Default_texture}
        matrix <1.000000, 0.000000, 0.000000,  0.000000, 1.000000, 0.000000,
0.000000, 0.000000, 1.000000,  0.000000, 7.976446, 0.000000>
}
#declare data_Lathe_shape_ob = lathe { bezier_spline 4,
    <0,1><0.5,0.5><0,0><0,-1>
    texture {Default_texture}
        matrix <4.859933, 0.000000, 0.000000,  0.000000, 4.859933, 0.000000,
0.000000, 0.000000, 4.859933,  0.000000, 6.200044, 0.000000>
}
#declare data_Box_shape_csg =
difference {
    object {data_Box_shape_ob}
    object {data_Lathe_shape_ob}

    matrix <1.000000, 0.000000, 0.000000,  0.000000, 1.000000, 0.000000,
0.000000, 0.000000, 1.000000,  0.000000, 7.976446, 0.000000>
}
object {data_Box_shape_csg
    matrix <1.000000, 0.000000, 0.000000,  0.000000, -0.000000, -1.000000,
0.000000, 1.000000, -0.000000,  0.000000, 0.000000, 0.000000>
}
light_source {
    <4.08,5.9,-1.01>
    color rgb<1, 1, 1>
    fade_distance 29.9999828339
    fade_power 1
}
camera {
    perspective
    location  <0,0,0>
    look_at  <0,0,-1>
    right <-1.7777777777777777, 0, 0>
    up <0, 1, 0>
    angle  49.134343
    rotate  <-26.440706, 46.691945, -0.000003>
    translate <7.481132, 5.343666, 6.507640>
}

The object moves per frame.


Post a reply to this message


Attachments:
Download 'render.jpg' (9 KB)

Preview of image 'render.jpg'
render.jpg


 

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