🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sgi.general
Article #21

Re: Fun dynamic sketching program for IRISes.

#21
From: Paul Close
Date: Wed, 13 Feb 1991 17:47
131 lines
4054 bytes
In article <85040@sgi.sgi.com> paul@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@sgi.com	   ...!{ames, decwrl, ucbvax}!sgi!pdc

	It is pitch dark.  You are likely to be eaten by a grue.
Technical Details
Message-ID: <1991Feb13.174735.6161@dragon.wpd.sgi.com>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!sgi!shinobu!sgihub!dragon!news
References: <85040@sgi.sgi.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!sgi!shinobu!sgihub!dragon!news
From: pdc@sgi.com (Paul Close)
Newsgroups: sgi.general,sgi.engr.all,comp.sys.sgi
Subject: Re: Fun dynamic sketching program for IRISes.
Message-ID: <1991Feb13.174735.6161@dragon.wpd.sgi.com>
Date: 13 Feb 91 17:47:35 GMT
References: <85040@sgi.sgi.com>
Sender: news@dragon.wpd.sgi.com (CNews Account)
Reply-To: pdc@sgi.com (Paul Close)
Organization: Silicon Graphics, Inc., Mountain View, CA
Lines: 131