Fun dynamic sketching program for IRISes.
Paul Close
pdc at sgi.com
Thu Feb 14 04:47:35 AEST 1991
In article <85040 at sgi.sgi.com> paul at manray.asd.sgi.com (Paul Haeberli) writes:
>Here's a little program that uses a very simple dynamics model
>to draw caligraphic strokes. Please give it a try if you have
>an IRIS workstation.
This is indeed a *highly cool* program! If however, you have 8-bit graphics
on your PI, you'll want to apply the following unoffical patch (the line
numbers might be off because I didn't strip the headers):
*** dynadraw.c.old Wed Feb 13 09:38:06 1991
--- dynadraw.c Wed Feb 13 09:39:56 1991
***************
*** 164,170 ****
winopen("dynadraw");
glcompat(GLC_OLDPOLYGON,1);
subpixel(1);
! RGBmode();
gconfig();
qdevice(LEFTMOUSE);
qdevice(MIDDLEMOUSE);
--- 164,170 ----
winopen("dynadraw");
glcompat(GLC_OLDPOLYGON,1);
subpixel(1);
! shademodel(FLAT);
gconfig();
qdevice(LEFTMOUSE);
qdevice(MIDDLEMOUSE);
***************
*** 244,250 ****
my = fgetmousey();
if(filterapply(&mouse,mx,my)) {
drawsegment(&mouse);
! RGBcolor(0,0,0);
buzz();
if(getbutton(RIGHTSHIFTKEY))
shrink = shrink*0.98;
--- 244,250 ----
my = fgetmousey();
if(filterapply(&mouse,mx,my)) {
drawsegment(&mouse);
! color(0);
buzz();
if(getbutton(RIGHTSHIFTKEY))
shrink = shrink*0.98;
***************
*** 270,281 ****
int x, y;
ortho2(0.0,1.25,0.0,1.0);
! RGBcolor(200,200,200);
setpattern(0);
clear();
npolys = 0;
showsettings();
! RGBcolor(0,0,0);
}
showsettings()
--- 270,281 ----
int x, y;
ortho2(0.0,1.25,0.0,1.0);
! color(51);
setpattern(0);
clear();
npolys = 0;
showsettings();
! color(0);
}
showsettings()
***************
*** 284,292 ****
int xpos;
ortho2(-0.5,xsize-0.5,-0.5,ysize-0.5);
! RGBcolor(200,200,200);
rectfi(0,0,xsize,2*SLIDERHIGH);
! RGBcolor(0,0,0);
sprintf(str,"Mass %g",curmass);
cmov2i(20,3+1*SLIDERHIGH);
charstr(str);
--- 284,292 ----
int xpos;
ortho2(-0.5,xsize-0.5,-0.5,ysize-0.5);
! color(51);
rectfi(0,0,xsize,2*SLIDERHIGH);
! color(0);
sprintf(str,"Mass %g",curmass);
cmov2i(20,3+1*SLIDERHIGH);
charstr(str);
***************
*** 299,305 ****
draw2i(xsize,1*SLIDERHIGH);
move2i(0,2*SLIDERHIGH);
draw2i(xsize,2*SLIDERHIGH);
! RGBcolor(255,0,0);
xpos = SLIDERLEFT+curmass*(xsize-SLIDERLEFT);
rectfi(xpos,1*SLIDERHIGH,xpos+4,2*SLIDERHIGH);
xpos = SLIDERLEFT+curdrag*(xsize-SLIDERLEFT);
--- 299,305 ----
draw2i(xsize,1*SLIDERHIGH);
move2i(0,2*SLIDERHIGH);
draw2i(xsize,2*SLIDERHIGH);
! color(1);
xpos = SLIDERLEFT+curmass*(xsize-SLIDERLEFT);
rectfi(xpos,1*SLIDERHIGH,xpos+4,2*SLIDERHIGH);
xpos = SLIDERLEFT+curdrag*(xsize-SLIDERLEFT);
***************
*** 322,328 ****
delx = f->angx*wid;
dely = f->angy*wid;
! RGBcolor(0,0,0);
px = f->lastx;
py = f->lasty;
nx = f->curx;
--- 322,328 ----
delx = f->angx*wid;
dely = f->angy*wid;
! color(0);
px = f->lastx;
py = f->lasty;
nx = f->curx;
--
Paul Close pdc at sgi.com ...!{ames, decwrl, ucbvax}!sgi!pdc
It is pitch dark. You are likely to be eaten by a grue.
More information about the Comp.sys.sgi
mailing list