POV-Ray : Newsgroups : povray.binaries.images : Drawing a line - attn kurtz le pirate Server Time: 22 Nov 2019 05:11:44 GMT
  Drawing a line - attn kurtz le pirate (Message 1 to 2 of 2)  
From: Bald Eagle
Subject: Drawing a line - attn kurtz le pirate
Date: 13 Oct 2019 01:00:01
Message: <web.5da2767e99a8678a4eec112d0@news.povray.org>
Like so:

 #version 3.8;
 global_settings {assumed_gamma 1.0 }
 #include "colors.inc"

#declare Aspect = image_width/image_height;

 camera {
  location <0, 0, -15>
  right x*Aspect
  look_at <0, 0, 0>
 }

light_source {<0, 5, -10> color White}

plane {z, 1 pigment {White*0.2}}

#declare Line = 0.015;
#declare LinePigment = pigment {Yellow+White/2}


#declare P1 = <-3, 0, 0>;
#declare P2 = < 3, 0, 0>;
#declare Vector = P2-P1;

#declare D = vlength (Vector);
#declare N = vnormalize (Vector);
#declare E = 0.000001;

#for (M, 0, D, D/20)   // clock simulator
 union {
  sphere {P1, 0.1 pigment {Red}}
  sphere {P2, 0.1 pigment {Green}}
  cylinder {0, N*M+(x*E), Line translate P1}
  translate y*5.5
  translate -y*M*2
  no_shadow
 }
#end


Post a reply to this message


Attachments:
Download 'drawline.png' (336 KB)

Preview of image 'drawline.png'
drawline.png


 

From: kurtz le pirate
Subject: Re: Drawing a line - attn kurtz le pirate
Date: 18 Oct 2019 15:13:59
Message: <5da9d6b7$1@news.povray.org>
On 13/10/2019 02:57, Bald Eagle wrote:
> Like so:
> 
>   #version 3.8;
>   global_settings {assumed_gamma 1.0 }
>   #include "colors.inc"
> 
> #declare Aspect = image_width/image_height;
> 
>   camera {
>    location <0, 0, -15>
>    right x*Aspect
>    look_at <0, 0, 0>
>   }
> 
> light_source {<0, 5, -10> color White}
> 
> plane {z, 1 pigment {White*0.2}}
> 
> #declare Line = 0.015;
> #declare LinePigment = pigment {Yellow+White/2}
> 
> 
> #declare P1 = <-3, 0, 0>;
> #declare P2 = < 3, 0, 0>;
> #declare Vector = P2-P1;
> 
> #declare D = vlength (Vector);
> #declare N = vnormalize (Vector);
> #declare E = 0.000001;
> 
> #for (M, 0, D, D/20)   // clock simulator
>   union {
>    sphere {P1, 0.1 pigment {Red}}
>    sphere {P2, 0.1 pigment {Green}}
>    cylinder {0, N*M+(x*E), Line translate P1}
>    translate y*5.5
>    translate -y*M*2
>    no_shadow
>   }
> #end
> 

Hello.
Thanks for your code.
I did almost the same thing :

#declare vector = vnormalize(p2-p1);

#declare i=frame_number+0.001;
cylinder {
	0, vector*i, rLine
	translate p1
	pigment { color Yellow }
	}


;)



-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message


Attachments:
Download 'drawline2.gif' (112 KB)

Preview of image 'drawline2.gif'
drawline2.gif


 

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