Write a simple particle system using webgl

Assignment Help Computer Graphics
Reference no: EM132498682

MP4: A Simple Physics Engine

Write a simple particle system using WebGL to handle the display. Particle systems are typically used to model fine-grained physical effects like fire, smoke, and water. We will do something simpler and just render a system of bouncing spheres in 3D. The specifics of how you implement the following features are up to you...write an app that you think is fun...

Your program will render a set of spheres bouncing around an invisible (or visible if you wish...) 3D box. You could use a box with corners (-1,-1,-1) to (1,1,1) for example. When a sphere hits one of the walls in the box, it should reflect in physically realistic manner.

Particles
You should keep an array or list of particles.

Each particle will be have a postion PP and velocity VV...both of these quantities will be three-dimensional. Each particle will be represented by a sphere. You should have each sphere have an individual color and radius. It is acceptable for some speheres to appear identical, but your code should generate a variety of different-looking spheres. Use the Phong or Blinn-Phong reflection model and Phong shading (i.e. per-fragment shading)...have the spheres look nice.
You only need to generate one sphere mesh...you simply draw that mesh in multiple different spots each frame...once for each particle. You can use some of the code on the course website that can generate and render a sphere.
User Interface
Your user interface should allow you to create spheres using a mouse click or key press. Each creation event should create nn spheres, where nn is some number of your choosing.
The spheres should be genereated with a semi-random position and velocity. It doesn't have to be truly random, but there should be some variety.
You will need to bound those values to be reasonable (e.g. position inside the box). You will also need a reset button that will remove all existing spheres from the scene.

Physics
After rendering a frame showing the current position of the spheres, you will need to update the position and velocity of each sphere:
• Update the position using the current velocity and Euler integration
• Update the velocity using the acceleration and Euler integration and drag.
• Update the acceleration using the forces of gravity.

Implement 2 forces that affect the spheres: gravity and friction. If you want to violate physics for fun and have the spheres gain velocity after hitting walls, you can implement a mode to do that as well.

Attachment:- MP4 Physics Engine.rar

Reference no: EM132498682

Questions Cloud

Leave the us in the 1820s-1900 : Do you think African Americans who chose to leave the U.S. in the 1820s-1900 made the right choice? Provide an example to support your argument.
Do you think historians should evaluate carter legacy : How do you think historians should evaluate Carter's legacy?
How important is the economic content of the story : What is important here is the economic content of the story. If, for example, the important news is about a change in government in country X, you should focus.
What is the unrealized gain or loss for the securities : Assuming an existing $1500 debit balance in Fair Value Adjustment - Equity Investments, what is the unrealized gain or loss for these securities
Write a simple particle system using webgl : Write a simple particle system using WebGL to handle the display. Particle systems are typically used to model fine-grained physical effects like fire
What are the roots of the civil rights conflict : What do you consider to be the largest strides in civil rights progress, and what do you consider to be the most inhibitive factors of the movement?
What are some key fixed and variable costs for the business : What are some key fixed and variable costs for this business? Remember, fixed costs do not change when output changes. That is, fixed costs remain even.
Describe the monetary philosophy of andrew jackson : Describe the monetary philosophy of Andrew Jackson and compare it to the view of henry Clay and Nicholas battle second president of the bank
What was the residual earnings : The year with book value per share of $3.00 (i.e. 100,000 shares of common stock issued and outstanding) what was its residual earnings?

Reviews

Write a Review

Computer Graphics Questions & Answers

  Create a simple warm-up program using your g3d

Create a simple warm-up program using your G3D programming and graphics environment.

  Shadow effect while rolling a sphere

Shadow effect while rolling a sphere as well as the options of shading and lighting.

  Relative positioning and interactive positioning

Relative Positioning and Interactive Positioning by Dragging and Clicking and some Simple Animation

  Draw a teapot at the global origin

Draw a teapot at the global origin

  Concepts of computer graphics

Concepts of Computer Graphics and develop a program using OpenGL

  The security policy document outline

Using the GDI Case Study below, complete the Security Policy Document Outline

  Develop the image manipulations

Develop the image manipulations

  What does resolution mean

What does resolution mean How is resolution connected to ppi and dpi units

  Differentiate between a bitmap image and a vector image

Differentiate between a bitmap image and a vector image Explain the following terms

  Essential elements of a design pattern

configuration of an Iterator pattern, patterns could be used in a Library System, Singleton, Template, Decorator, Façade,What does Alexander means by the following declaration "But it is impossible to form anything which has the temperament of natu..

  Framework of user interface design

design of user interfaces, natural mapping, GUI applications, web page design different to designing for printed media, risks exposed in this "phone as individual proxy" approach, interaction designers of ubicomp applications, Storyboards are usual..

  What are the factors affecting picture composition

Define picture composition What are the factors affecting picture composition. Elaborate on each factor Describe the basic lines present in a composition

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd