Click here to Skip to main content
15,886,199 members
Home / Discussions / Algorithms
   

Algorithms

 
JokeThe full truth is 84. Pin
Bernhard Hiller25-Nov-10 22:32
Bernhard Hiller25-Nov-10 22:32 
JokeMore false idols Pin
cp987627-Nov-10 0:13
cp987627-Nov-10 0:13 
AnswerRe: TIL...... Pin
dpminusa10-Nov-10 14:54
dpminusa10-Nov-10 14:54 
Questionimage bounds after rotation Pin
mehdi001628-Oct-10 11:14
mehdi001628-Oct-10 11:14 
AnswerRe: image bounds after rotation [modified] PinPopular
Luc Pattyn28-Oct-10 11:39
sitebuilderLuc Pattyn28-Oct-10 11:39 
GeneralRe: image bounds after rotation Pin
Sauro Viti3-Nov-10 10:51
professionalSauro Viti3-Nov-10 10:51 
GeneralRe: image bounds after rotation Pin
Luc Pattyn3-Nov-10 11:10
sitebuilderLuc Pattyn3-Nov-10 11:10 
GeneralRe: image bounds after rotation Pin
Sauro Viti3-Nov-10 20:47
professionalSauro Viti3-Nov-10 20:47 
Read carefully the formula:

rotated_x =  x * cos(alpha) + y * sin(alpha)
rotated_y = -x * sin(alpha) + y * cos(alpha)


What you need is abs(rotated_y) which is:

new_height = abs(-width * sin(alpha) + height * cos(alpha))


And this is different from the sum of abs of each component:

abs(-width * sin(alpha)) + abs(height * cos(alpha))
    ^
    |
    +- This is the minus that you are talking about, I suppose

GeneralRe: image bounds after rotation Pin
harold aptroot3-Nov-10 21:40
harold aptroot3-Nov-10 21:40 
GeneralRe: image bounds after rotation Pin
Sauro Viti3-Nov-10 22:42
professionalSauro Viti3-Nov-10 22:42 
GeneralRe: image bounds after rotation Pin
Luc Pattyn4-Nov-10 2:50
sitebuilderLuc Pattyn4-Nov-10 2:50 
QuestionSimple Algebra Pin
mbadi24-Oct-10 22:59
mbadi24-Oct-10 22:59 
AnswerRe: Simple Algebra Pin
Tadeusz Westawic25-Oct-10 4:50
Tadeusz Westawic25-Oct-10 4:50 
QuestionInterest Calculation (for Pensions Schemes) Pin
mbadi24-Oct-10 21:57
mbadi24-Oct-10 21:57 
AnswerRe: Interest Calculation (for Pensions Schemes) Pin
Richard MacCutchan24-Oct-10 22:44
mveRichard MacCutchan24-Oct-10 22:44 
GeneralRe: Interest Calculation (for Pensions Schemes) Pin
mbadi24-Oct-10 23:11
mbadi24-Oct-10 23:11 
GeneralRe: Interest Calculation (for Pensions Schemes) Pin
Richard MacCutchan25-Oct-10 0:24
mveRichard MacCutchan25-Oct-10 0:24 
AnswerRe: Interest Calculation (for Pensions Schemes) Pin
Luc Pattyn25-Oct-10 2:32
sitebuilderLuc Pattyn25-Oct-10 2:32 
AnswerRe: Interest Calculation (for Pensions Schemes) Pin
Tadeusz Westawic25-Oct-10 4:37
Tadeusz Westawic25-Oct-10 4:37 
QuestionContours / Isolines Pin
Kyudos18-Oct-10 21:09
Kyudos18-Oct-10 21:09 
AnswerRe: Contours / Isolines Pin
Peter_in_278018-Oct-10 21:50
professionalPeter_in_278018-Oct-10 21:50 
AnswerRe: Contours / Isolines Pin
Alan Balkany19-Oct-10 4:08
Alan Balkany19-Oct-10 4:08 
QuestionPV, FV and IRR Calculation Pin
davjanks10-Oct-10 21:24
davjanks10-Oct-10 21:24 
AnswerRe: PV, FV and IRR Calculation Pin
Luc Pattyn11-Oct-10 1:29
sitebuilderLuc Pattyn11-Oct-10 1:29 
GeneralRe: PV, FV and IRR Calculation Pin
davjanks11-Oct-10 7:35
davjanks11-Oct-10 7:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.