Math Formula Application

Status
Not open for further replies.
Forgot to mention, the Program uses .NET 1.1 I believe (Could use 1.0, I've been swapping them in and out, due to compatability with some old programs I've been developing, either way 1.1 will work) and if there is anything you would like for me to add to the app just let me know.

I'm very new at all this stuff and what is in the app is basically all I have used, so I'm sure it's missing a lot of important stuff.

Let me know,
Dustin
 
Hey, wanted to say good idea! I had an error and a few suggestions for you. The math behind the calculation of the screen size / throw (distance to screen) is off. The screen size comes out too small or the throw is too long. It should be:

An externally hosted image should be here but it was not working when we last tested it.


That's the only error I see.

I would suggest adding the option to use different units for each variable. I've seen focal lengths in inches and millimeters. Lots of people are not from the USA and use metric. I would also suggest adding the aspect ratio 5:4 and 16:10 (to join 4:3 and 16:9). 5:4 is 1280x1024 (common in 17" monitors) and 16:10 is 1920x1080 and 1440x900 (common in widescreen computer monitors 17" and 15.4").

Otherwise, you've got a good idea going here.
 
I'm in my university library right now, but I will check the code when I get home.

Also, I wanted to ask if there was an easier way of finding the WxH dimensions of the screen from the diagonal distance.

The way that I was doing the math was:

Width = (Aspect Wide/Aspect Diagonal)*Actual Diagonal
Height = (Aspect Height/Aspect Diagonal)*Actual Diagonal


To find the Aspect Diagonal you would use Pythagorean Theorem of the Aspect Ratio:

(Aspect Width^2 + Aspect Height^2)^1/2 = Aspect Diagonal

So for 4:3 it would be:
(4^2 + 3^2)^1/2 = Aspect Diagonal = 5

So for a Diagonal Length of 10 in to find the WxH I would be doing:

Width = (4/5)10 = 8 in
Height = (3/5)10 = 6 in


Rinse and Repeat for other aspect ratio's right?


Thanks for your help!
 
The way I figure out my height and width (aside measuring it) is:

(width^2 + [(inverse aspect ratio) * width]^2)^0.5 = LCD Diagonal

Solve for width. Take positive value. Then:

(width) * (inversed aspect ratio) = height

Ex: 17" screen. 5:4 ratio

(width^2 + [(4/5) * width]^2 = 17

Width = about 13.3"

Height = 4/5 * 13.3 = about 10.6"

If you are programming in C++, I know there are libraries for square roots and such.
 
So, for comparison's sake, in the same situation using my equation:

Aspection Ratio = 5:4

Aspect Diagonal = (5^2 + 4^2)^1/2 = ~6.4

Actual Diagonal = 17"

Actual Width = (5/6.4)17" = 13.28"
Actual Height = (4/6.4)17" = 10.63"

Thus making both equations correct. 🙂

Good to know.

I'm using VB.NET and no need for square root functions, can just use ^(1/2) for square root or ^(1/3) for cubed root, etc.,



I just updated the program. I had the right equations (I believe), but the rounding method I was using jacked it up somehow, dunno, should be fixed anyway.

I also added a drop down box with common Aspect Ratios, you can use your own too so long as it is in W:H format.

I will add conversions between SI and Metric as soon as I don't feel like being lazy. I think that will take heavy modification of the code.


Edit: Just updated again with a few bug fixes to keep the program from crashing...I'm sure you can still find a way, but this will help for now. Let me know of any bugs.
 
Your equation for the Projection Size and Distance Calculations are still not correct. I'll put in the values 457mm (18") FL, 17" LCD, and 100" throw. That is suppose to give a 77.4" screen. On yours it gives 64.8". Also, the "Calc Width x Height" is not calculating correctly. They are coming out too high. Just to let you know. Keep going! It's worth the effort. I do like the colors (as you enter the value) and the pulldown menu. Maybe you can make a generic Aspect Ratio value entry where you can put in any values. Just a suggestion.

I also ran into the error:

An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


This happened when you remove the LCD value and then try to enter the throw or screen diag size.
 
That bug was fixed, I intended for you to not be able to change the Distance to the Screen or the Diagonal Projection Size when either the LCD Diagonal Size or the Focal Length is empty. So that's fixed.

And to be honest, I really have no idea how you got that answer of 77.4"

The equation is:

((Distance - FL) * LCD Diagonal)/FL = Projection Diagonal

So:

Distance = 100" = 2200mm
FL = 457 mm
LCD Size = 17" = 374mm

=

((2200 - 457) * 374)/457 = (1743 * 374)/457 = 1426.44mm = 64.83"


That was all done manually. So unless I am misunderstanding the equation, that should be correct.

Also, as for the dimensions, when I enter resolutions that I truly know the aspect ratio of (640x480 for 4:3) it comes out perfect.

I guess I don't know where I'm going wrong with either of my equations...nonetheless the bug you submitted has been fixed.


Edit: I'm really dumb, I was converting between SI and Metric incorrectly. Changed it and uploaded it, let me know.
 
I'm on a university library computer right now, but I'm trying to figure all of this out.

I'm just confused... I'm thinking "aloud" as I type along here, so bear with me:

Suppose that the diagonal 17" of is the hypotenuse of a right triangle.

Using the numbers that you suggest we should derive 17 from the Pythagorean Theorem.

((13.3 ^ 2) + (10.6 ^ 2)) ^ (1/2) = 17.007

So that is definitely right...

So assuming an aspect ratio of 5:4 or 1.25 then 13.3/10.6 should = ~1.25 as well.

13.3/10.6 = 1.254

Wow, so that's right too...

As for the numbers my program is spitting out, 14.16 and 11.3:

14.16/11.3 = 1.253

As for Pythagorean Theorem

((14.16 ^ 2) + (11.3 ^ 2)) ^ (1/2) = 18.116

Lol, what the hell? I guess that my program assumes that 14.16x11.3 is correct because it is a thousandth closer to true 5:4? I don't know...

Reading back through the posts, the only thing I can think of is that I typed the equation into my application wrong, because we proved that my equation actually works earlier, even with the 17" diagonal.

Aspection Ratio = 5:4

Aspect Diagonal = (5^2 + 4^2)^1/2 = ~6.4

Actual Diagonal = 17"

Actual Width = (5/6.4)17" = 13.28"
Actual Height = (4/6.4)17" = 10.63"

So I guess I'll check the code when I get home.

Also, I wanted to say, thanks so much for your help.
 
FIXED.

Redownload and check it! 😎


Also, are there any other common equations I can throw in here too? I haven't started to actually design my projector because of $$$ (or lack thereof), but once I start it'd be nice to have those available if I need them too.

Thanks again! 🙂
 
Aspect ratio fixed! Awesome. I did run into another error:

An externally hosted image should be here but it was not working when we last tested it.


This occurred when I calculated screen size, then removed the LCD size, and then tried to remove the focal length (leaving the throw in).

An enhancement that would be easy but very useful. When calculating the height and width from the diagonal (entering just the LCD diag and getting a h x l), it would be a good idea to increase precision (in the LCD diag field) to the 100ths place. Right now you have it rounding to the nearest 0.5 (ie, 17.1, 17.2, 17.3, 17.4 are all the same height and width in your equations and 17.5, 17.6, 17.7, 17.8, 17.9 are all the same). This isn't mission critical but LCDs are often not EXACTLY 15in or 17in, or 14in. My LCD is "17" diagonal" but it actually measures 17.1". A 10th of an inch can change your screen size, fresnel placement, lens placement, etc.

Another equation that is often overlooked but VERY important is:

1 / (Projection Lens Focal Length) = 1 / (Distance from LCD to Projection Lens) + 1 / (Throw)

This equation dictates where you place your LCD. Keep at it!
 
Status
Not open for further replies.