Computer graphic mathematical modelling question

Click For Summary

Discussion Overview

The discussion revolves around modeling shadow dispersion in a computer graphics shader, specifically focusing on a scenario involving a brick wall casting a shadow on a plane. Participants explore mathematical approaches to represent this concept, particularly in a way that allows for variable control over shadow characteristics without relying on a light source.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant seeks guidance on modeling shadow dispersion in a shader, expressing a desire to understand the mathematics involved in 3D modeling.
  • Another participant questions the meaning of "shadow dispersion" and asks for clarification on how it is measured.
  • A participant elaborates on "shadow dispersion," describing it as the filling of a shadow area with pixels of varying opacity, aiming for a gradient-like falloff effect.
  • One participant provides a mathematical approach to determine the edge of the shadow based on the height of the light source, the distance from the wall, and the wall's height, presenting a proportional relationship.
  • A later reply expresses appreciation for the mathematical example provided, indicating a realization that simpler methods may suffice for their needs, contrasting with more complex mathematical concepts like differential geometry.

Areas of Agreement / Disagreement

Participants generally agree on the need for a mathematical approach to model shadow dispersion, but there is no consensus on the specific definitions or measurements of "shadow dispersion." The discussion includes varying levels of complexity in the proposed solutions.

Contextual Notes

Participants mention different mathematical areas such as differential geometry and vector calculus, indicating that these may be relevant for more accurate physical modeling, but the current focus is on simpler, more efficient methods for real-time applications.

Liquid7800
Messages
76
Reaction score
0
Hi,

I am just finished my Calc II class and a programming class and I am trying to write a computer graphics shader...

My goal is to model this scenario:
"Imagine a brick wall standing on a plane --- a shadow will be cast depending on the light source" ---my goal is to model the dispersion of the shadow (area?) at the point of intersection between the wall and ground plane.

Eventually I want to eliminate the light source from the equation and control through variables the amount of shadow dispersion...a kind of faux shadow shader based on object intersections.

Problem is I've learned how to solve a lot of calculus problems and math problems in general...but I've had trouble modelling them (especially in 3 dimensions)...and this is the area I really want to break into, and where I think an example could really help me get started.

Can anyone help me get started or at least point me in the right direction with the mathematics I may need? Thanks in advance...
 
Mathematics news on Phys.org
What do you mean by "dispersion of the shadow"? What is it measured by?
 
Eventually I want to eliminate the light source from the equation and control through variables the amount of shadow dispersion...a kind of faux shadow shader based on object intersections.

What I am trying to describe when I say "shadow dispersion" is I am attempting to fill a given area (the shadow area--blob shape at the object intersections) with pixels of a different color (say black at 75% opacity...that disperse and fade out in a gradient-like falloff from the intersection).
My units of measure would be the amount of pixels to fill that area...which are basically points in computer screen space.

This is not 'physically accurate' but would be very efficient in real-time applications.
 
Well, obviously a straight line from your light source to the top of the wall will hit the floor at the edge of the shadow. And that's a simple "proportion" problem. If the light is at height "H" above the floor and distance "d" from the wall, while the wall has height "h", then, letting "x" be the distance to the edge of the shadow on the other side of the wall, x/h= (x+d)/H so Hx= hx+ hd, (H- h)x= hd and x= hd/(H-h).
 
Thanks for the reply!
This is great I needed to see this kind of example.
I like that nice little equation...I was way off;...getting way too complex and researching things that were much more complex than needed to be (looking at things like differential geometry, vector calculus etc.)
I guess these subject areas would be used more for accurate physical modeling of light and shadow behavior.
Again, I appreciate your contribution...
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
15
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 27 ·
Replies
27
Views
2K
  • · Replies 47 ·
2
Replies
47
Views
5K
  • · Replies 64 ·
3
Replies
64
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K