Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °
| |
|
|
You are not logged in. Post a replyTopic review (newest first)
That might be a better solution, ryos, good contrib.
Maths - 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:
If it should refer to the original point then it should not be so hard in this case what you said.
If the user moves again to (250,270) and is still dragging, then always refer to the original point (100,100), so you would have:
But doesn't a or Δy mean the value that x2 changed. So i think it would be an new x3-x2.
To contrain proportions, can't you just say that b = (800/600) * a ?
ok i tought so.
I 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.
Is 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 ?
Thank you wcy but i don't think that will help you.
visit http://www.geocities.com/chengyuanwu
Yep that coverd more then enough.
So, 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.
Look at this swf. I used it becuase i think it explains better. |