Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °
| |
|
|
You are not logged in. #1 2005-08-13 01:44:10
Constrain proportionsLook at this swf. I used it becuase i think it explains better. #2 2005-08-13 02:10:21
Re: Constrain proportionsSo, the width is originally 350.65 and the height is originally 263. That means that the width is always (350.65/263) times greater than the height. If the width increases by a certain amount, the height would change by (263/350.65) times that certain amount. Why did the vector cross the road? It wanted to be normal. #3 2005-08-13 03:48:04
Re: Constrain proportionsYep that coverd more then enough. #4 2005-08-13 20:22:56
Re: Constrain proportionsvisit http://www.geocities.com/chengyuanwu #6 2005-08-16 17:40:20
Re: Constrain proportionsIs there a way to make it with out using the other variable in the formula? I mean for example in a=(width/height)b is there a way to make this formula without b ? Last edited by bogdan (2005-08-16 17:55:40) #7 2005-08-16 17:55:44
Re: Constrain proportionsI don't think so. If you didn't need b to calculate a then b could take any value and a would still work out to be the same thing, so obviously the proportions would be lost. Why did the vector cross the road? It wanted to be normal. #9 2005-08-16 20:05:31
Re: Constrain proportions
To contrain proportions, can't you just say that b = (800/600) * a ? "The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman #10 2005-08-17 18:27:29
Re: Constrain proportionsBut doesn't a or Δy mean the value that x2 changed. So i think it would be an new x3-x2. #11 2005-08-17 22:10:54
Re: Constrain proportionsIf the user moves again to (250,270) and is still dragging, then always refer to the original point (100,100), so you would have: "The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman #13 2005-08-18 01:38:19
Re: Constrain proportionsMaths - I may be reading your code wrong, but I don't think that's quite the effect he was looking for.
In order to constrain the proportion to 4:3, you need to change one side in proportion to the side whose delta is greater. That way, the user's mouse stays connected with at least one side of the rectangle. So: El que pega primero pega dos veces. #14 2005-08-18 07:36:57
Re: Constrain proportionsThat might be a better solution, ryos, good contrib. "The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman |