Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ ¹ ² ³ °
 

You are not logged in. #1 20050813 01:44:10
Constrain proportionsLook at this swf. I used it becuase i think it explains better. #2 20050813 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 20050813 03:48:04
Re: Constrain proportionsYep that coverd more then enough. #4 20050813 20:22:56
Re: Constrain proportionsvisit http://www.geocities.com/chengyuanwu #6 20050816 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 (20050816 17:55:40) #7 20050816 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 20050816 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 20050817 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 x3x2. #11 20050817 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 20050818 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 20050818 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 