ScratchData LogoScratchData
Back to Paddle2SeeFixIt's profile

Simple Plotter from Data

PAPaddle2SeeFixIt•Created September 9, 2008
Simple Plotter from Data
1
0
154 views
View on Scratch

Description

This addresses a request in the Forum from gagetman about bringing some data in what looks like some sort of simple HPGL plot format (pen up, pen down, goto x,y) into Scratch. Okay, so I took the data file and converted it to one piece of data per line using the VIM editor in a Unix emulator (Cygwin) because that was the simplest way I could think of to do it. Then, I wrote a simple interpreter project in scratch and tried it out. It looked like the pen needed to start at a certain position to work right so I stuck that in and this is what I ended up with. This project only recognizes 3 commands: "up" - Pen up "down" - Pen down "goto" - Goto. The X and Y coordinates must follow the goto command, each on it's own line. Some day when we have string manipulation functions in Scratch, we won't need to do all the file manipulation stuff. We can just read the lines in, break them up into fields and plot them. I can hardly wait! The data can be found at the original posting <A href="/forums/viewtopic.php?pid=67753#p67753">(link to forums)</A>

Project Details

Project ID261627
CreatedSeptember 9, 2008
Last ModifiedSeptember 9, 2008
SharedSeptember 9, 2008
Visibilityvisible
CommentsAllowed