Click here to Skip to main content
6,630,289 members and growing! (22,855 online)
Email Password   helpLost your password?
Desktop Development » Miscellaneous » General     Intermediate License: The Code Project Open License (CPOL)

A C# Tiny Fireworks Simulator

By Chootair

A tiny fireworks simulator based on a simple physical engine. The user can configure 10 launchers with the initial speed of the bomb, the explosion form and the explosion colour.
C#, .NET, Dev
Version:3 (See All)
Posted:17 Feb 2009
Views:6,024
Bookmarked:26 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
6 votes for this article.
Popularity: 3.11 Rating: 4.00 out of 5

1

2
2 votes, 33.3%
3
2 votes, 33.3%
4
2 votes, 33.3%
5
FireWorksSimulator_Sources

Introduction

The purpose of the article is more to present the application than to explain the technical facets of the code which is in fact quite simple. The aim of the application is to display firework particles on a dedicated user control. In fact, the user control manages a list of fireworks bombs all along their life cycle; the user can launch at any time a new bomb via the bomb launcher controls on the bottom of the window.

Description

Each fireworks bomb contains a list of fireworks particles, the first time the list consists of only one particle launched on vertical axis; when this particle comes on its apogee, it is deleted and new particles populate the list; those particles symbolise the explosion particles.

At each timer tick, the simulator control refreshes the position of each particle of each bomb. The refresh position is computed by a basic physical engine; in fact each particle has a mass and forces applied on it. The physical engine uses the fundamental principle of dynamics: sum of external forces equals the mass multiplied by the acceleration.

The form of the explosion is given by the expression of the initial speed of the explosion particles. The application implements 10 different explosion forms; from basic (circle) to more strange ... Furthermore to try to improve the similarity, a fader effect plays on the particles.

History

  • 17th February, 2009: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Chootair


Member

Occupation: Engineer
Location: France France

Other popular Miscellaneous articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 3 of 3 (Total in Forum: 3) (Refresh)FirstPrevNext
GeneralGreat! Pinmembermikkojay19:42 17 Jun '09  
Generalok PinmemberDonsw9:24 5 Mar '09  
GeneralMusic PinmemberSk8tz2:35 24 Feb '09  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 17 Feb 2009
Editor: Deeksha Shenoy
Copyright 2009 by Chootair
Everything else Copyright © CodeProject, 1999-2009
Web22 | Advertise on the Code Project