We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › Help getting started 2D (or maybe 3D)graph...
Page Index Toggle Pages: 1
Help getting started 2D (or maybe 3D)graph... (Read 579 times)
Help getting started 2D (or maybe 3D)graph...
Jul 1st, 2008, 8:10pm
 
Hello to all! My apologies as this is a little long.  I looked through the forums and tried to figure out the best place for this post.  If there is a better forum for this, please feel free to move it or let me know where to repost.  Briefly, I've worked in healthcare for a long time and I have an opportunity to make a career change.  The last time I dealt with programming was in the early 80's (Basic,Fortran IV).  

For my current "task" that I need to solve, I started to learn VB, but a friend told me about "Processing" and thought it might be better suited for me so...

Let's say I have an "object" which is 10(height) x 5(width) x 5(depth).  Each 1x1x1 cube within will have one of five shades of blue (depending on values assigned to the cube).  My initial thought (since I'm brand new to this) was to present this as a 2D graph with the user clicking "down" through each layer.  I figure I can always try a 3D approach if time permits (I have 1-2 months to figure this out).  Overall, what this project requires me to do is import data from an SD card (representing the values for the "cubes") and present it in a graphically pleasing (and useful!) format.  I will eventually also want to display the graph showing changes over time.

I started reading "Processing: A Programming Handbook..." and found alot of it interesting (well written, fortunately for me less technical than other programming books), but found myself getting bogged down in too many details as I have a bad habit of trying to "read it all".  I am trying to learn how to focus on what I need to learn to get the task done as opposed to trying to learn it all at once.

Again, my apologies for such a long post.  I am excited about learning "Processing" since the book presents in a very readable format (and the whole "open source" thing).  If someone could point me in the right direction to get started with this graph (what chapters/topics to focus on or if there is sample code showing this) I would greatly appreciate it.  I feel bad asking for help with what is probably going to turn out to be a simple problem (considering some of the incredible graphs/images I saw in the book).    

Summarizing, I want to create a 2D graph with layers (for now)from data imported from an SD card.  Thanks for reading this long post!  

P.S. Can Processing help me with creating a GUI and also with importing data from an SD card?      
Re: Help getting started 2D (or maybe 3D)graph...
Reply #1 - Jul 2nd, 2008, 12:09am
 
1. you need to extract data from your SD card. actually, we don't care so much about the SD card, since it is the file stored on it which is important, and above all, its type. is it an xml file? a simple text file? how is it structured? this is the kind of things you need to know. maybe an existing library (Reference > Libraries) can help you import the data.
http://processing.org/reference/libraries/index.html

2. then you'll probably store the data in an array, or something like that, and look for a nice way to display the data onto the screen.

the Learning > Basics section is full of examples
http://processing.org/learning/basics/index.html

and you'll find some help in the Syntax Questions / Programs boards of the forum if you face more specific issues.
Re: Help getting started 2D (or maybe 3D)graph...
Reply #2 - Jul 2nd, 2008, 5:35am
 
Thanks for the reply.  From what I've been told the data will be text files (but will need to be converted to some type of number format).  I will check out the links you posted for more information.  I'm sure I'll be back with more questions.  Thanks for your help.
Page Index Toggle Pages: 1