Attached is a wind barb input / display program

rated by 0 users
This post has 5 Replies | 1 Follower

Top 50 Contributor
Posts 24
jim_halbach Posted: Mon, Feb 12 2007 2:51 PM

Since weather data has been made available.  Perhaps a wind barb display technique will spark some programming ideas.  The attached zip file contains KPL source produced with standard Phrogram.

Another version of this same function using an animated sprite.  The attached zip file windsprite.zip contains :  "anibarbs.gif"  a set of wind barbs.
and  "windsprite.kpl" .  It is a modified "Facing2D.kpl" from: 4 ) Class Library Learning Examples > Sprites

OOPS ( 4 - 16 - 07 ):  in trying to add "windsprite.zip" to this message, I accidently removed the earlier version "windspin.zip"  .  The version with animated sprite is much nicer.

OOPS follow up ( 4 - 19 - 2007 ): restored windspin.kpl to the zip file. Enhanced windsprite.kpl

OOPS follow up ( 8 - 25 - 2007 ): strange behavior depending on location of source when processed by Phrogram ?

I've had an odd experience with some functionality with respect to sprites :  The phrogram "windsprite.kpl"
which is modeled after the "Facing2D.kpl" phrogram behaves differently when launched from a folder
within a "My Phrogram Files" subfolder and when launched from a subfolder somewhere else.  It also
can be confirmed that a created install behaves differently when the subfolder of the original code is
outside "My Phrogram Files".  The attached setup files demonstrate this issue.  O_setup.exe was made
outside "My Phrogram Files",  I_setup.exe was made within a "My Phrogram Files" subfolder.  The attached "jpg" files O_windsprite.jpg and I_windsprite.jpg ... 

It seems that the sprite feature "SetRotationOffset" is behaving differently depending on where the KPL
source is located.  Helpful advice would be appreciated.  Note that with the mouse in the same position,
the wind barbs are perpendicular ...

 

Top 25 Contributor
Posts 173
Jamey replied on Tue, Feb 13 2007 6:29 AM

Nice program!  Great idea!  Now if I could just figure out how to get data from my anemometer & weather vane....

(I love it when someone takes pieces from my programs & uses them in new and improved ways; that's why I write them.) 

Visit me at JameyFriend.com.
Top 50 Contributor
Posts 24
OOPS ( 8 - 25 - 2007 ):  attempt to add setup.zip removed windsprite.zip... Attached is 4 - 19 - 2007 ... containing windspin,windsprite, anibarbs.gif
Top 10 Contributor
Posts 378
TomDad replied on Tue, Aug 28 2007 11:39 AM

This is so clever...spinning the mouse over the selected barb in the windsprite example and it goes round really fast!

That is a very clever piece of code!

TomDad. Tom is my son...and I'm his Dad. So we are TomDad Software.
Top 10 Contributor
Posts 559
davidw replied on Wed, Aug 29 2007 10:17 AM
Nice display of the concept... I have added to our math and learning program downloads area ... thanks!
Top 50 Contributor
Posts 24

It is possible to write a version of wind barb program  in the Scratch graphic language with the USB hardware input board. I had hoped that there might be some way to link Phrogram to Scratch:  perhaps the USB interface could be fashioned into a library module ?  perhaps file output from Scratch would be available for Phrogram.  Unfortunately, I don't know that much about SQUEAK and the USB interface.  I also could not find any file output functions in the Scratch language ? This hardware board only costs 25 bucks.  Unfortunately, the features don’t work in the java implementation for testing ON-LINE.  http://scratch.mit.edu/projects/jamesjoseph/44028  You need to install the Scratch program on your machine.    Since the folks at http://scratch.mit.edu initiated the LEGO mindstorm project: perhaps this group would be more open to an interface with Phrogram than the folks at LEGO.  My reading of forums on this issue suggested that LEGO has a relationship with LABVIEW that perhaps the folks at http://scratch.mit.edu/scratchboard/  do not have.  Hopefully, they would be interested in some form of collaboration.

Page 1 of 1 (6 items) | RSS