Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.

simulation of a Galton board

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-12-2007, 06:10 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 269
Default simulation of a Galton board

Hi all,

I've added a simulation of a Galton board. This is basically a pyramid of nails down which a set of marbles tumbles down every time a chance of 0.5 to fall to the left or right. In this simulation the number of rows, marbles and chances can be reset to other values. The red curve show the probability distribution and the black columns the actual count.
I am looking for a way to actually do the simulation using a sprite or something like that to see it tumbling down.
Suggestions are more then welcome as I have had very much trouble developing a loop for the input of numbers to be between limits. Cableguy did a tremendous job in suggestion the LostFocus Sub but I am not yet quite happy with the result because after giving <ENTER> after a wrong input the program doesn't show a messagebox which it does if you move the focus to the next textbox.
Thanx to all your kind input.
Marc
Attached Files
File Type: sbp Galton.sbp (8.6 KB, 108 views)
Reply With Quote
  #2 (permalink)  
Old 05-12-2007, 07:49 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Thanks for the reference, all i tryed todo was help....

BTW, why not try to catch the "enter" key and call lost focus with it?
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #3 (permalink)  
Old 05-13-2007, 10:00 AM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 269
Default

NP, you do good work all over the board I noticed. Deserves a compliment.
Now, how would I do that, catch the Enter key? With keypress?
Marc
Reply With Quote
  #4 (permalink)  
Old 05-13-2007, 07:57 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 269
Default

Managed to put in a picture
Attached Images
File Type: jpg Galton.jpg (14.9 KB, 43 views)
Reply With Quote
  #5 (permalink)  
Old 05-13-2007, 08:21 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Hi Stellaferox

Yes with the keypress, the hardware(keybord) enter key is chr13 but as noted by @Work in is thread (http://www.basic4ppc.com/forum/questions-windows-mobile/69-hardware-library-woes-revisited.html) there are diferences between the HW keyboard and the SIPs...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Back to the drawing board ...... taximania Chit Chat 13 06-17-2008 11:55 AM
Tab Simulation @ Runtime anansath Questions (Windows Mobile) 1 05-19-2007 03:55 PM


All times are GMT. The time now is 02:18 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0