Jump to content
• Advertisement

# How far does something have to be till it becomes a point?

This topic is 4781 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

## Recommended Posts

I am quite rubbish at Math so I need a little help at solving this problem. Can someone help me understand or show me some examples of how I could use this to help me determine how far a certain object (say a sphere) should be from the camera when it is at a point, maybe I am overlooking a lot of things like the camera FOV and possibly some other things, like I say I am so bad at math but I can grasp stuff if I read it over and over again. I was looking into angular size as described on this page http://www.ifa.hawaii.edu/faculty/barnes/ast110/homework/hw3.html it says that a = L/d Where a is the angle, L is the linear size and d is the distance. What I don't understand is L, the linear size. The explanation on that page shows it as the projection onto the back card, but how does L relate to real size? Thanks! :)

#### Share this post

##### Share on other sites
Advertisement
hw3.html? You do realize it's against the rules to ask homework questions, don't you?

#### Share this post

##### Share on other sites
L is the amount of separation between the cards.

Quote:
 Next, cut a piece of thread a bit longer than your arm. Take one end of the thread and tape it along the edge of one card. Take the other end and tape it along the edge of the other card. Measure the length of the thread left between the cards, and call that length L'. The thread enables you to hold the two cards a fixed distance apart.

#### Share this post

##### Share on other sites
Its true that homework/schoolwork isn't within forum rules described at Forum FAQ. However, this topic is of general interest in graphics and game development. Also, I'm going to give Fluxtah the benefit of the doubt that this is not his/her homework since the page referenced is in Hawaii, US while the Fluxtah is in the UK.

Therefore, the topic can remain open.

I think you have it backwards. The referenced web page calls L a length and d a diameter. In computer graphics terms, assuming the camera is looking straight at the object, then L is the distance from the camera to the center of the object and d would be a representative diameter of the object as measured perpendicular to the camera view axis. Think of d as the diameter of a bounding sphere of the object.

The image plane exists at the front clip plane of the camera, and has a certain number of pixels, the window size such as 800 x 600 pixels. Using linear interpolation and the camera perspective projection information (e.g., the view frustum), you can determine how many pixels an object at distance L with diameter d will take up in the image plane.

One intuitive choice is to decide that the object becomes a point when its distance is such that its bounding sphere only takes up one pixel on the image plane. Of course, you could decide that it becomes a point when it takes up 5 pixels or whatever else makes sense!

#### Share this post

##### Share on other sites
The simpliest answer I think is similar triangles. If you scale a side of a triangle by c then all the rest of the sides have to scale by c as well to keep from changing the interior angles of the triangle. So say dx is the horizontal distance between adjacent pixels in the z=nz plane. Then the horizontal distance between adjacent pixels in the z=oz plane is dx*oz/nz. That is assuming the camera is at the origin pointing down the z axis.

#### Share this post

##### Share on other sites
If you want to get technical (I know you don't but I will anyway), since a point has 0 extents (ie no size, only location) then a finite object will become a visible point when it is an infinite distance from the viewer.

Or you could use one of the considerably more helpful posts above. [wink]

#### Share this post

##### Share on other sites
Are you trying to do something practical with this information? Could probably get some more details if you want to explain that. In game development, a point is limited in scale to a pixel. Once it becomes smaller than that, average 3D graphics representation will begin blinking the point in and out as the view is adjusted or as distance increases. It's actually pretty annoying.

#### Share this post

##### Share on other sites
Thanks for the response guys, because I have limited knowledge of perspective projection I have had to take a step back and study my 3D Math book, however I am still very confused to how perspective projection actaully works.

The book describes the pin hole camera where the pin hole is the centre of projection and the projection plane is the back of the box that the pinhole projects onto.

What I don't understand is where is the projection plane in practice? I have my perspective matrix in direct3d but it does not contain this information, or maybe I don't know where which rows/cols I need to look for it.

It shows that a point P in world space can be projected onto the projection plane at P1 with the following formula, calculating for the y component of P1
P1y = -d*Py      -----        z`

It says that -d is the distance from the centre of projection to the projection plane, it describes for practicality we can move the projection plane in front of the centre of projection so we can remove the negative sign on d.

If I can't find the projection plane I won't know the distance d :(

I need to understand this before I can move on to the above suggestions, anyone help a dummie? :)

Kest: I think my question was one of those things passing by in my mind, it's something I just wanted to know.

Thanks for the help again guys.

#### Share this post

##### Share on other sites
The camera is at the origin pointing down the negative z axis and the plane of projection is z=-nz. That's in camera relative coordinates. That's definitely after the model transform, but I'm not familar enough with DirectX to say if it is before or after the world transform. If the world transform is normally a projection then it is before, otherwise after in all likelyhood.

#### Share this post

##### Share on other sites
I am not sure, in managed directx I concat the matrices as worldMatrix * viewMatrix * perspectiveMatrix so I guess the worldMatrix is before.

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
4. 4
Rutin
12
5. 5
• Advertisement

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633694
• Total Posts
3013378
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!