Murga-Projects Forums

Full Version: FLTK Graphics Functions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here's a demo of the FLTK Graphics Functions.

The program draws concentric rings using the mouse as an origin
It cycles through the colors continously.
While the mouse is down it will switch tools, switching until the mouse is up.

The variables have very interesting effects, someday I'll get around to a
UI for them, for now here's the psychedelic murga brush.
How delightfully obnoxious =o)

I added this to the end, just above the callback loop, to control the background color and fullscreen from the commandline:

for i=1,table.getn(arg) do
if arg[i] == "-f" then w:fullscreen() end
if arg[i] == "-c" then w:color(arg[i+1]) end

I wonder if you wrote this on Mac and then made a change or two on Windows? It's apparently in Unix format, but the doTools_circles function contains several DOS line breaks (^M). They don't cause trouble, but I just thought it was interesting.

oh full screen is fun, thanks for that, going to keep that handy!

I've been very side tracked hacking the ascii text out of my first computer, the Mattel Aquarius.

Programming Microsoft BASIC 1.0 with   Virtual Aquariusby emulating Windows with Crossover.

Lots of back and forth between windows/unix/mac.

I was having fun with iGame3D's text features a few weeks ago
and decided to relive some old school BASIC coding by printing
game characters to the screen.

The running man was the first program I wrote on my Aquarius on Christmas morning 1983.

So I brought him to iGame3D with his friend using Fluid to
build the whole script and a little interface intended to manipulate the
text. Here's a movie of the that

Now this all ties into this thread because, the program I hacked
on the Aquarius about a bazillion times is this:

REM this is MS BASIC 1.0 1983
5 PRINT CHR$(11)
10 PI=3.14159
20 FOR J=30 TO 2 STEP -2
30 R=J
40 FOR I=0 TO 2*PI STEP .1
50 X=R*COS(I)
60 Y=R*SIN(I)
70 PSET(40+X,40+Y)
REM See what happens when you change the values after STEP in lines 20 and 40.

Totally Awesome 320 x 200 resolution graphics!
Blazing Fast..3.5 Mhz! See it Go!

In Rev I converted ye olde compter programme to  the Nautilus

Then  iGame3D  switched to Lua so I learned lua
by going back to the roots and creating this :

-- circles with lua
function circles(halfWidth,halfHeight)
for j=30,2,-2 do
for i=0,C,.1 do
print(string.format("%s%d%s%d","drawLine ",pointx,",0,",pointy))

And now...the murgaLua fltk graphic functions demo. ta-da!

I didn't know 'for' could go backward, or that you could change the step amount. That's more than payback for fullscreen =o)
Reference URL's