|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ok. bear with me. I know I should know this, and it is really basic, but between
my meds and my state of mind, I can't think of it.
I created this object
#declare floorframe = box{<0.283031,-0.001781,-0.001781>,
<0.283031,0.001781,0.501781>}
and starting at
object{floorframe translate<0,1.570883,0>}
I am placing them downwards in increments of 0.032059
until it stops at 0 or thereabouts (not below).
I actually crunched out 20 numbers until I remembered there is a way to do it
using steps, but God help me I can't remember how. Can you help me out?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"David Kraics" <bar### [at] aolcom> wrote:
> Ok. bear with me. I know I should know this, and it is really basic, but between
> my meds and my state of mind, I can't think of it.
>
> I created this object
> #declare floorframe = box{<0.283031,-0.001781,-0.001781>,
> <0.283031,0.001781,0.501781>}
>
> and starting at
> object{floorframe translate<0,1.570883,0>}
>
> I am placing them downwards in increments of 0.032059
> until it stops at 0 or thereabouts (not below).
>
> I actually crunched out 20 numbers until I remembered there is a way to do it
> using steps, but God help me I can't remember how. Can you help me out?
guessing you're thinking of '#for' loop.
<https://wiki.povray.org/content/Reference:Conditional_Directives#The_for_Directive>
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "David Kraics" <bar### [at] aolcom> wrote:
> > Ok. bear with me. I know I should know this, and it is really basic, but between
> > my meds and my state of mind, I can't think of it.
> >
> > I created this object
> > #declare floorframe = box{<0.283031,-0.001781,-0.001781>,
> > <0.283031,0.001781,0.501781>}
> >
> > and starting at
> > object{floorframe translate<0,1.570883,0>}
> >
> > I am placing them downwards in increments of 0.032059
> > until it stops at 0 or thereabouts (not below).
> >
> > I actually crunched out 20 numbers until I remembered there is a way to do it
> > using steps, but God help me I can't remember how. Can you help me out?
>
> guessing you're thinking of '#for' loop.
>
> <https://wiki.povray.org/content/Reference:Conditional_Directives#The_for_Directive>
>
>
> regards, jr.
Ok I tried with
#for (ff,1.570883,0,-0.032059)
object{floorframe translate<0,ff,0>}
#end
and there is no object. I thought that maybe it just moved one object downward
but it doesn't show at all.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"David Kraics" <bar### [at] aolcom> wrote:
> ...
> Ok I tried with
>
> #for (ff,1.570883,0,-0.032059)
> object{floorframe translate<0,ff,0>}
> #end
>
> and there is no object. I thought that maybe it just moved one object downward
> but it doesn't show at all.
ah. please post a "minimal" scene showing /reproducing the problem. thanks.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "David Kraics" <bar### [at] aolcom> wrote:
> > ...
> > Ok I tried with
> >
> > #for (ff,1.570883,0,-0.032059)
> > object{floorframe translate<0,ff,0>}
> > #end
> >
> > and there is no object. I thought that maybe it just moved one object downward
> > but it doesn't show at all.
>
> ah. please post a "minimal" scene showing /reproducing the problem. thanks.
>
>
> regards, jr.
ummm
#version 3.5;
#include "colors.inc" // Standard Color definitions
#include "textures.inc" // Standard Texture definitions
#include "shapes.inc"
#declare position= <.375,.7 ,-2.5>; // used for camera and its associated camera
light. //2.337965
background { color<0.0078125,0.51171875,0.8359375>}
camera
{
location position
// look_at <0.0 , 0.0 , 0.0>
}
#declare floorframe =
box{<0.283031,-0.001781,-0.001781>,<0.283031,0.001781,0.501781>}
box{<-.28125,0,0>,<.28125,1.635,.5> pigment{Grey}}
#for (ff,1.570883,0,-0.032059)
object{floorframe translate<0,ff,0>}
#end
// upper right light
light_source{<1000, 1000, -5000>color White}
// upper left light
light_source{<-1000, 1000, -5000>color White}
it should show a series of black lines across the grey box like a ladder or
something. Basically, I intend to create a grid. I am making the horizontal
lines before the vertical ones. This loop doesn't give anything, however.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"David Kraics" <bar### [at] aolcom> wrote:
> ...
> > ah. please post a "minimal" scene showing /reproducing the problem. thanks.
> ummm
:-)
> #version 3.5;
unsure but think '#for()' wasn't around then. try a 3.7 / 3.8 executable ?
thanks for posting. will have a look tonight.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "David Kraics" <bar### [at] aolcom> wrote:
> > ...
> > > ah. please post a "minimal" scene showing /reproducing the problem. thanks.
> > ummm
>
> :-)
>
>
> > #version 3.5;
>
> unsure but think '#for()' wasn't around then. try a 3.7 / 3.8 executable ?
>
> thanks for posting. will have a look tonight.
>
>
> regards, jr.
changed to 3.7. no difference.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
> changed to 3.7. no difference.
I used a 3.8.0-alpha, but with the '3.7' version directive.
I changed 'floorframe' to a 'box {0,1}' and in the loop gave the object a
different pigment on each iteration (just cycling through r/g/b). the box does
move :-) your "grey" box is "in the way", there are coinciding surfaces (I'm
guessing looking at output). suggest/recommend you write the scene with simple
unit dimensions, and do the exact stepping / locating / sizing when you're happy
with the basic thing. (if needed can clean up code and post later/tomorrow).
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> > changed to 3.7. no difference.
>
> I used a 3.8.0-alpha, but with the '3.7' version directive.
>
> I changed 'floorframe' to a 'box {0,1}' and in the loop gave the object a
> different pigment on each iteration (just cycling through r/g/b). the box does
> move :-) your "grey" box is "in the way", there are coinciding surfaces (I'm
> guessing looking at output). suggest/recommend you write the scene with simple
> unit dimensions, and do the exact stepping / locating / sizing when you're happy
> with the basic thing. (if needed can clean up code and post later/tomorrow).
>
>
> regards, jr.
Removed the grey box, ran it again and... OMG I'm so stupid. In the definition
of the floorframe box, the first X value is supposed to be negative. Fixed that
and now the code works.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|