Hello everyone,
I like to save time of others, so I explained my question just in the picture.
I have no idea, how to solve this, can someone help, please?
Well, the problem is asking about the intensity of light at any arbitrary distance from the source. Given that light follows the inverse square law, how far have you gotten in applying the formula?
For me is not problem calculate intensity of light for a specific point in space, point is easy. Problem for me is make the average sum of all the points lying on the c8 square...
I think, there is also a second solution:
We can project the grid to a spherical surface, the center of the sphere is the source of light. Now the area of c8 square projected on the spherical surface is the ansver, but I do not know how can I calculate the surface area defined by 4 points on a spherical surface.
Technically, that line of reasoning isn't wrong. It's true that there are an infinite number of points inside of square C8, but I don't think that's relevant to the problem at hand. Assuming that what you've written on the image is the entirety of the problem statement, copied word-for-word from your book/assignment sheet, then all we know is that the light source is located at square E5. If we're concerned about accuracy down to a single point inside square C8 for the destination, then logically we would also be concerned with accuracy down to a single point for the source. My best guess would that the problem wants you to treat each square in the diagram as a discrete unit of space, which cannot be further subdivided. However, you may wish to ask your professor to verify that this assumption is correct.
Light source is located exactly and with high precision. In that picture it is located above the center of the e5 square (as example).
I am working on 3D grafic, the squares are actually pixels, and they cannot be subdivided. I need assign a single color (value) to each pixel (square). The grid is actually a monitor.
I can use higher performance approximation, but I do not want to. I would like to know the exact values, and the good calculation performance I do not need.
I was wrong a little bit. I need assign not a single color (integer from 0 to 255) to each square, but rather value of high precission, because later I need make calculations with that squares, so I need keep the precission of calculation as high as possible.
Er.. okay. You'll have to bear with me a moment, as I'm no longer certain what you're requesting help with. You say you're making a 3D Graphic. And you say "the grid is actually a monitor," but I don't know what you mean by that. Best I can tell, you're seeking to create an image depicting some sort of light source, and you want to shade and color the surrounding pixels, such that the light in the picture appears as realistic as possible. Is that a correct interpretation?
I was wrong a little bit. I need assign not a single color (integer from 0 to 255) to each square, but rather value of high precission, because later I need make calculations with that squares, so I need keep the precission of calculation as high as possible.
Okay. What is your mathematical definition of the calculation that you're needing to do? You've received some suggestions on formulas (such as basing your values on distances or light intensities), but you say that these won't work. Why, mathematically? What, mathematically, is missing? (We can only help you with the math. Whatever other considerations are in play, you'll need to explain in detail.) For instance, what, specifically, would be wrong in picking a center point for each pixel, applying the light-intensity formula to that point, and then assigning that value to that entire pixel? Since you're doing a grayscale (right?), what do you mean by "high precision", since you're not allowed to use the 256 shades of grayscale?
... Best I can tell, you're seeking to create an image depicting some sort of light source, and you want to shade and color the surrounding pixels, such that the light in the picture appears as realistic as possible. Is that a correct interpretation?
I don't know the exact mathematical definition of that problem. I made the picture, so everybody can see what is going on. You understand it well too, I know it, because you wrote this:
... For instance, what, specifically, would be wrong in picking a center point for each pixel, applying the light-intensity formula to that point, and then assigning that value to that entire pixel? ...
That is easy approximation, and I am sure that solution (of picking a center point) makes false colors. I would like to try more realistic solution. Error of false color is not too much for 1 pixel, but I need sum of 1 000 000 pixels colors, so I am afraid the error will be bigger, because errors accumulation can occur? If someone use a approximation, then he need to know an amount of overal error, right?
Yes, I am doing it in greyscale. My "high precision" means, the value is not integer from 0 to 255, but real number from 0.00000000 to 1.00000000, because a rounding errors can occur.
...
But anyway, I like to know, is there an exact equation for that problem with no approximation?
Hello everyone,
I like to save time of others, so I explained my question just in the picture.
I have no idea, how to solve this, can someone help, please?
In the simplest sense, the 'free space' light intensity is given by I(R)=R2S
Where S is a source level constant for a point source and R is the distance from the source [typically there is a reference distance, e.g. 1 m, and, because of the problems at R=0, one doesn't get much closer than that reference distance]. The distance from the fixed source point at (x0,y0,z0) is
R = (x−x0)2+(y−y0)2+(z−z0)2
Now, to your problem: If we let the origin of your system be the lower left of your board, that is the lower left of square a1, and R1 be the distance above the board (flat screen) of the point source. Then the point source is at (5.5, 4.5, R1) then we have the point R1=(5.5, 4.5, 0) and I(R1)=R12S=1
so that S = R12 and I(R)=R2R12
If you want the center of a square to represent the average intensity in that square, then you can either compute on the fly, i.e. divide your square into n sections, compute intensities and average, or build an array to store values, retrieve values and average.
...
If you want the center of a square to represent the average intensity in that square, then you can either compute on the fly, i.e. divide your square into n sections, compute intensities and average, or build an array to store values, retrieve values and average.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.