Computer graphic mathematical modelling question

In summary, the speaker is seeking help with modeling a brick wall and its shadow in a computer graphics shader, with the goal of controlling the amount of shadow dispersion through variables. They are unsure of the mathematics needed and are looking for guidance. The concept of "shadow dispersion" is described as filling an area with pixels of a different color in a gradient-like falloff from the intersection. The units of measure would be pixels in computer screen space. The speaker mentions that this approach is not physically accurate but efficient for real-time applications. They are provided with a simple "proportion" equation to calculate the distance to the edge of the shadow. They express gratitude for the help and admit to overcomplicating the problem by researching more complex subjects such as
  • #1
Liquid7800
76
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
  • #2
What do you mean by "dispersion of the shadow"? What is it measured by?
 
  • #3
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.
 
  • #4
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).
 
  • #5
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...
 

FAQ: Computer graphic mathematical modelling question

What is computer graphic mathematical modelling?

Computer graphic mathematical modelling is the process of creating virtual 3D objects or environments using mathematical equations and algorithms. It involves using a computer to simulate the behavior and appearance of real-world objects or phenomena.

What types of mathematical models are used in computer graphics?

There are various types of mathematical models used in computer graphics, such as geometric models, lighting models, texture models, and motion models. These models help to create realistic and visually appealing graphics.

What is the purpose of using mathematical models in computer graphics?

The purpose of using mathematical models in computer graphics is to accurately represent and simulate real-world objects and phenomena. These models allow for precise control over the appearance, movement, and behavior of virtual objects, resulting in more realistic and immersive graphics.

How are mathematical models created for computer graphics?

Mathematical models for computer graphics are created using various techniques, including parametric equations, differential equations, and fractal algorithms. These models are then processed by computer software to generate 3D graphics.

What are some applications of computer graphic mathematical modelling?

Computer graphic mathematical modelling has various applications, including video games, animation, special effects in films, architectural and product design, and scientific simulations. It is also used in virtual reality and augmented reality technologies to create immersive experiences.

Back
Top