|
|
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'
|
|