diff options
Diffstat (limited to 'bezierstroke.pde')
| -rw-r--r-- | bezierstroke.pde | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/bezierstroke.pde b/bezierstroke.pde index 3c96023..d7fc939 100644 --- a/bezierstroke.pde +++ b/bezierstroke.pde @@ -145,7 +145,7 @@ class gradientstroke3D { noFill(); float spos=0.0; - float step=.03; //optimise + float step=0.03; //optimise //quad corner points //these are perpedicular on the screen as we are making a gradient line system @@ -192,3 +192,31 @@ class gradientstroke3D { } } + +class linear3D { + float linewidth; + color col; + sphereMap smap; + float hw,hh; + linear3D(float _l,color _c,sphereMap _sp){ + linewidth=_l; + col=_c; + smap=_sp; + hw=(getWidth()/2); + hh=(getHeight()/2); + } + void drawstroke(RPoint Sp,RPoint Ep) { + drawstroke(Sp,Ep,col); + } + void drawstroke(RPoint Sp,RPoint Ep,color _col) { + noFill(); + stroke(red(_col),green(_col),blue(_col),255); + strokeWeight(linewidth); + RPoint L0=smap.per(Sp,4); + RPoint L1=smap.per(Ep,4); + line(L0.x+hw,L0.y+hh,L1.x+hw,L1.y+hh); + } + +} + + |
