POV-Ray : Newsgroups : povray.binaries.images : CSG and matrix. Server Time
24 Dec 2024 11:49:42 EST (-0500)
  CSG and matrix. (Message 1 to 8 of 8)  
From: LanuHum
Subject: CSG and matrix.
Date: 6 Oct 2019 01:25:01
Message: <web.5d997979b1e6ae3751e1b25f0@news.povray.org>
Hello! I never learned to speak English, but I have to ask. :)
I create an object CSG. Coordinates not in center


Post a reply to this message


Attachments:
Download 'csg1.jpg' (206 KB)

Preview of image 'csg1.jpg'
csg1.jpg


 

From: LanuHum
Subject: Re: CSG and matrix.
Date: 6 Oct 2019 01:30:00
Message: <web.5d997bd38913137851e1b25f0@news.povray.org>
"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}
}


Post a reply to this message


Attachments:
Download 'csg2.jpg' (195 KB)

Preview of image 'csg2.jpg'
csg2.jpg


 

From: LanuHum
Subject: Re: CSG and matrix.
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


 

From: LanuHum
Subject: Re: CSG and matrix.
Date: 6 Oct 2019 01:45:00
Message: <web.5d997f038913137851e1b25f0@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> "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.

Matrices are multiplied. How to manipulate an object using a matrix?


Post a reply to this message

From: LanuHum
Subject: Re: CSG and matrix.
Date: 6 Oct 2019 02:10:00
Message: <web.5d9982868913137851e1b25f0@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> "LanuHum" <Lan### [at] yandexru> wrote:
> > "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.
>
> Matrices are multiplied. How to manipulate an object using a matrix?

Please help! I wrote a song. Now I will make an animated clip using a break


Post a reply to this message


Attachments:
Download 'speakers.jpg' (27 KB)

Preview of image 'speakers.jpg'
speakers.jpg


 

From: LanuHum
Subject: Re: CSG and matrix.
Date: 6 Oct 2019 03:10:01
Message: <web.5d9992ba8913137851e1b25f0@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> Please help! I wrote a song. Now I will make an animated clip using a break
Sorry! Using a Povray. :)


Post a reply to this message

From: Bald Eagle
Subject: Re: CSG and matrix.
Date: 6 Oct 2019 08:25:01
Message: <web.5d99dbf0891313784eec112d0@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:

> Matrices are multiplied. How to manipulate an object using a matrix?

Back to matrices again.   :)

If you understand the basic functions of the different parts of the matrix, then
you can compose a composite matrix by - as you pointed out - multiplying the
matrices together.

But that is simply representing what happens when you apply one matrix after
another - sequentially.

So, recently in my camera angle research, I came across a thread that had some
nice SDL, and if I remember correctly (IIRC) you can therefore do something
like:

object {
     MyObject
     transform {
          matrix {} // first matrix transform
          matrix {} // second matrix transform
          matrix {} // third matrix transform
          ... etc.
     }
}

I just got up and have other things going on, but I think that due to the nature
of transforms and how they are applied to objects, you may have to invert the
order of the matrices that get applied, but maybe I'm confusing that with
something else that's closely related.

I hope that answers most of what you were asking - sorry if I missed anything.

{Also: someone had a question about using orthographic view in Blender}
see:
http://news.povray.org/povray.general/message/%3Cweb.5d97ca568fd7f7baf8be68120%40news.povray.org%3E/#%3Cweb.5d97ca568fd
7f7baf8be68120%40news.povray.org%3E


Certainly we could all use more matrix scenes, macros, diagrams, examples,
tutorials, and perhaps even one day a distro include file with hardcore matrix
stuff - or implemented in source.


Post a reply to this message

From: LanuHum
Subject: Re: CSG and matrix.
Date: 6 Oct 2019 11:40:00
Message: <web.5d9a0a988913137851e1b25f0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "LanuHum" <Lan### [at] yandexru> wrote:
>
> > Matrices are multiplied. How to manipulate an object using a matrix?
>
> Back to matrices again.   :)
>
> If you understand the basic functions of the different parts of the matrix, then
> you can compose a composite matrix by - as you pointed out - multiplying the
> matrices together.
>
> But that is simply representing what happens when you apply one matrix after
> another - sequentially.
>
> So, recently in my camera angle research, I came across a thread that had some
> nice SDL, and if I remember correctly (IIRC) you can therefore do something
> like:
>
> object {
>      MyObject
>      transform {
>           matrix {} // first matrix transform
>           matrix {} // second matrix transform
>           matrix {} // third matrix transform
>           ... etc.
>      }
> }
>
> I just got up and have other things going on, but I think that due to the nature
> of transforms and how they are applied to objects, you may have to invert the
> order of the matrices that get applied, but maybe I'm confusing that with
> something else that's closely related.
>
> I hope that answers most of what you were asking - sorry if I missed anything.
>
> {Also: someone had a question about using orthographic view in Blender}
> see:
>
http://news.povray.org/povray.general/message/%3Cweb.5d97ca568fd7f7baf8be68120%40news.povray.org%3E/#%3Cweb.5d97ca568
fd
> 7f7baf8be68120%40news.povray.org%3E
>
>
> Certainly we could all use more matrix scenes, macros, diagrams, examples,
> tutorials, and perhaps even one day a distro include file with hardcore matrix
> stuff - or implemented in source.

Thank you!


Post a reply to this message

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