Quick Search for:  in language:    
code,creates,particles,Each,particle,random,m
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
.Net Stats

 Code: 157,764. lines
 Jobs: 478. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login





Latest Code Ticker for .Net.
Click here to see a screenshot of this code!Weather Buddy
By Roger Martin on 1/28

(Screen Shot)

On The Fly Image Resizing, And Saveing
By Chris Hood on 1/27


Click here to see a screenshot of this code!Zip/View Project
By Mähr Stefan on 1/27

(Screen Shot)

Quick Audit
By Thomas Michael McGeown on 1/27


Click here to see a screenshot of this code!Kill Timer
By Adam( ) on 1/26

(Screen Shot)

Fibonacci Function
By Paddy Pasqualmie on 1/25


ID3v1.1 Reader
By Lewis Moten on 1/25


Click here to see a screenshot of this code!Lotto Picker
By Mick Doherty on 1/24

(Screen Shot)

Load a PopUnder using InternetExplore r
By Norberto Olazabal on 1/23


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

Orbiting Particles

Print
Email
 
winzip icon
Submitted on: 8/9/2002 12:30:57 AM
By: Andrew Mathiason 
Level: Advanced
User Rating: By 9 Users
Compatibility:VB.NET

Users have accessed this code 2895 times.
 
(About the author)
 
     This code creates up to 10 particles. Each particle has a random mass, initial speed, position, and initial direction. Each particle will then interact with the other particles on the screen and all will adjust positions, speed, and direction according to the gravitational forces affecting it. By modifying the code to create customized particles instead of randomly generated particles the user can: -Create a solar system with orbiting planets around a sun. -Change the limit set to maximum gravity and watch a 'slingshot' effect. -Add friction to the particles and watch as several particles collect together. (to do these, you can modify the presets in the code, or create your own) Three new objects are created: VectorPoint, Vector, and Particle. A particle contains a Vector, which uses a VectorPoint. Beginners can see how to set up their own custom objects, and how to use an object as a property of another object.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
8/12/2002 12:02:02 PM:Chris
Excellent work ! I haven't had a chance 
to delve into the code yet but I have 
enjoyed playing with the program. Great 
job.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/15/2002 6:11:32 AM:{ pHroZeN GeeK }
Really nice program Andrew.   5 rounds 
from me :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/22/2002 11:31:54 AM:
Neat...
You must have spend quite some 
doing this work :-) 5 from me
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/16/2003 2:05:51 AM:
Excellent code Andrew.  The classes are 
very impressive and I appreciate all 
the comments you added to each 
procedure.  Thanks for a great 
submission.  5 planets!   -Mark F
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/21/2003 9:00:10 PM:RMD Software
Very great code! The only thing : the 
VectorPoint class is not necessary; 
.NET provides the PointF 
(System.Drawing.PointF) structure which 
is the same as Point but with float 
(single) coordinates...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | .Net Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.