Proposal

Alyssa Lau, Jessica Plotkin, Jonathan Liu, and Zoe Zhang



Overview

In this project, we are going to implement a shader in ShaderToy to simulate a 2D lava lamp. Specifically, our program will simulate the fluid movement of the wax and some of the basic interactions between wax blobs. If we have time, we will add shading and coloring options to make our simulation look aesthetically pleasing, as well as some more interactions between the wax blobs.


Problem Description

Problem:

Our project will attempt to simulate the movements and interactions of the wax blobs within a lava lamp.

Challenges:

The movement of the wax blobs in a lava lamp is quite complex, as temperatures play a key role in the blobs’ speed and density at a given time. There are also many possible interactions between each blob (i.e. merging, splitting, and collisions), which can be difficult to properly simulate.

Solution:

We will use a particle system to model the wax and the Navier Stokes equations to model the movement of the particles. We will build a grid-based density field to model the change of shape and velocity of wax blobs by factors such as advection, heat dissipation, specific heat capacity, buoyancy, fluid pressure, and surface tension under different temperatures and external forces by the container and other blobs.

Goals and Deliverables

Images/videos to deliver:

We will be delivering videos of our 2D simulation of a lava lamp.

Demo:
- The user will be able to adjust the temperature of the system to see different particle behaviors under higher/lower temperatures

Measurements of the quality/performance of the system:

The wax particles should adhere to physical principles as much as possible. Following hypothetical physical rules, the particles should:
- Form a blob and split from the rest of the wax at the bottom of the container where temperature is higher
- Move up to the top of the container with upward acceleration
- Cool down and contract in volume (at the top)
- Move down to the bottom with downward acceleration and merge back

The blob should deform accordingly upon interacting with the container

Subtasks:

Plan to achieve:
- Learn how to use ShaderToy
- Make a basic wax simulator
- Grid-based density field with temperature gradient
- Contraction at the top and expansion at the bottom
- Sink and float, moving speed (kinematics determined by temperature)
- Interaction with container

Hope to achieve:
- Merging, splitting, interaction with multiple blobs
- Add coloring
- Adding shading
- Interactivity

Schedule

By the end of Week 1 (April 13th):
Begin researching and look through resources. Get familiar with ShaderToy. Start working on the subtask of making a basic “fluid” simulator for the wax.

By end of Week 2 (April 20th):
Continue working on the main goal and try to get a very basic implementation working. Begin working on subtasks such as adding temperature gradient, contraction, and expansion of fluid.

By end of Week 3 (April 27th):
Continue working on any remaining subtasks and refinements to our main goal. Potentially start working on reach goals to improve our simulation (color, shading, interactivity).

By end of Week 4 (May 4th):
Add finishing touches to project and stretch goals (if started). Create the website and make the videos.


Resources

References:
- A 3D Lava Lamp Simulation
- Particle-Based Fluid-Fluid Interaction
- A Particle System Representation of Candle Wax.
- Fluids-2D
- Navier–Stokes equations

Computing platform:
- Personal Laptops

Software Resources
- ShaderToy