๐พ Scalar fields
3D scalar fields
Section titled โ3D scalar fieldsโ๐ฏ An example of how to visualize scalar fields
๐ A VPython version is also available as scalar_plot.py.
What am I looking at?
Section titled โWhat am I looking at?โA scalar field is simply a function such that that assigns a single numeric value to each point in space. Examples of scalar fields are:
- temperature in a room
- pressure in the atmosphere
- electric potential of a charge
In this demo, the scalar field represents temperature in 3D space.
๐ฅ Starting situation: a hot spot
Section titled โ๐ฅ Starting situation: a hot spotโAt the beginning, the temperature is highest near the center and decreases smoothly outward:
This describes a localized heat source:
- hottest at the center
- cooler further away
- symmetric in all directions
You can think of this as a small hot object placed in cold space.
What happens over time? (Heat diffusion)
Section titled โWhat happens over time? (Heat diffusion)โAs time passes, heat spreads out due to diffusion.
Mathematically, this is described by the heat equation:
We donโt need to solve this equation to understand what happens:
- heat flows from hot regions to cold regions
- sharp peaks smooth out
- the temperature distribution becomes wider and flatter
In the animation, this means:
- colors fade at the center
- warmth spreads outward
- no heat is created or destroyed, it only redistributes
How to read the visualization
Section titled โHow to read the visualizationโ- Position of a sphere โ where in space we measure temperature
- Color of a sphere โ temperature at that position
- Time โ how long heat has been spreading
Why this is useful
Section titled โWhy this is usefulโThis kind of visualization helps you:
- understand abstract functions in 3D
- see what a partial differential equation does, not just how itโs written
- connect mathematics to physical intuition
Scalar vis-ร -vis vector quantities
Section titled โScalar vis-ร -vis vector quantitiesโ