# scaling

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

## Recommended Posts

I have two datasets displayed on separate screens. dataset1 has z values in the range 0 to 60. dataset2 has values from range -15 to 15. I have to apply uniform scaling on dataset2 so that it is equal to dataset1. But when I apply a scaling of 2 to the dataset2, it looks slightly bigger than dataset1 on the screen. The reason, as I understand is that, as I am using perspective projection and the place from where dataset1 starts and dataset2 starts is different (0 and -15), therefore I see one dataset slightly bigger than the other. unfortunately I cannot translate the dataset :( is there some method to control the fov or any parameter of perspective projection, so that I see the same size. thanks in advance

##### Share on other sites
You can use an orthographic projection.

##### Share on other sites

orthographic is not an option. have to use perspective :(

some kinda mathematical hint will be helpful

thanks

##### Share on other sites
Change the scale factor of one of the data sets..

Suppose you have a vertical fov - fovy; and a screen aspect - A.

Then try dividing the closest data set (or multiplying the furthest set) by:

tan(fovy*A)

(This is AFTER you do your initial scale (factor 2 in this case)).

(As always, be sure that your trig functions accept the same angle unit as that of your fovy).

[Edited by - wentworth on August 15, 2007 6:52:32 AM]

##### Share on other sites
thanks for the help

just a query.

u said "Then try dividing the closest data set by tan(fovy*A)"

do u mean that I should divide each vertex of my dataset with this value?

warm regards

##### Share on other sites
Quote:
 Original post by me_here_medo u mean that I should divide each vertex of my dataset with this value?

If that's how you "applied a scaling of 2", then yes.

##### Share on other sites

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

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628706
• Total Posts
2984309

• 23
• 10
• 9
• 13
• 13