Click here to Skip to main content
16,004,854 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: drawing algorithms Pin
El Corazon7-May-07 11:25
El Corazon7-May-07 11:25 
GeneralRe: drawing algorithms Pin
El Corazon7-May-07 15:34
El Corazon7-May-07 15:34 
GeneralRe: drawing algorithms Pin
El Corazon7-May-07 16:20
El Corazon7-May-07 16:20 
GeneralRe: drawing algorithms Pin
sarah_malik8-May-07 0:55
sarah_malik8-May-07 0:55 
QuestionHow to code for flipping an image myself ? Pin
coolguynp5-May-07 8:44
coolguynp5-May-07 8:44 
AnswerRe: How to code for flipping an image myself ? Pin
Mark Salsbery5-May-07 9:10
Mark Salsbery5-May-07 9:10 
AnswerRe: How to code for flipping an image myself ? Pin
Hamid_RT22-May-07 2:52
Hamid_RT22-May-07 2:52 
AnswerRe: How to code for flipping an image myself ? Pin
stevepqr29-May-07 4:12
stevepqr29-May-07 4:12 
Imagine your image in a mirror reflected in the Y Axis:-

|
0 | 0 | 1 | 1 | 0 | 0
----------|----------
1 | 1 | 0 | 0 | 1 | 1
----------|----------
0 | 0 | 1 | 1 | 0 | 0
|

All we do to achieve this is to negate the X coordinate:-

|
-3,1 | -2,1 | -1,1 | 1,1 | 2,1 | 3,1
-------------------|------------------
-3,2 | -2,2 | -1,2 | 1,2 | 2,2 | 3,2
-------------------|------------------
-3,3 | -2,3 | -1,3 | 1,3 | 2,3 | 3,3
|

But now its in the wrong place so we need to shift it to bring it back:-

SHIFT ---------->>

|
0 | 0 | 1 | 0 | 0 | 1
----------|----------
1 | 1 | 0 | 1 | 1 | 0
----------|----------
0 | 0 | 1 | 0 | 0 | 1
|


So generally we have for an n x m array of pixels reflected in the Y axis (ie horizontal reflection):-

(x,y) -> (-x+n+1,y) (for arrays starting at 0 drop the '+1')

and for the same n x m array of pixels reflected in the X axis (ie vertical reflection):-

(x,y) -> (x,-y+m+1) (for arrays starting at 0 drop the '+1')


Of course this only works for simply defined pixel arrays!


QuestionOpenGL problems Pin
XTAL2565-May-07 2:57
XTAL2565-May-07 2:57 
AnswerRe: OpenGL problems Pin
Rilhas19-May-07 10:59
Rilhas19-May-07 10:59 
GeneralRe: OpenGL problems Pin
XTAL25619-May-07 14:21
XTAL25619-May-07 14:21 
QuestionHElpppppppppppp Pin
HassanKU4-May-07 9:37
HassanKU4-May-07 9:37 
AnswerRe: HElpppppppppppp Pin
Mark Salsbery4-May-07 10:22
Mark Salsbery4-May-07 10:22 
Questionclueless Pin
Xraider Xenocide3-May-07 15:53
Xraider Xenocide3-May-07 15:53 
AnswerRe: clueless Pin
Christian Graus6-May-07 11:30
protectorChristian Graus6-May-07 11:30 
GeneralRe: clueless Pin
El Corazon7-May-07 5:36
El Corazon7-May-07 5:36 
AnswerRe: clueless Pin
Hamid_RT22-May-07 2:50
Hamid_RT22-May-07 2:50 
Questionhow to put a standard opengl in a windows form Pin
sinosoidal2-May-07 5:42
sinosoidal2-May-07 5:42 
AnswerRe: how to put a standard opengl in a windows form Pin
Jeff J Anderson6-May-07 22:32
Jeff J Anderson6-May-07 22:32 
Questionopen 2 window at the same time--->openGL???? Pin
Miss_ Petrovna1-May-07 8:50
Miss_ Petrovna1-May-07 8:50 
AnswerRe: open 2 window at the same time--->openGL???? Pin
El Corazon4-May-07 13:39
El Corazon4-May-07 13:39 
GeneralThank U..El Corazon Pin
Miss_ Petrovna5-May-07 5:57
Miss_ Petrovna5-May-07 5:57 
QuestionCapturing Network PC`s Desktop Pin
HassanKU1-May-07 5:55
HassanKU1-May-07 5:55 
AnswerRe: Capturing Network PC`s Desktop Pin
Mark Salsbery1-May-07 6:19
Mark Salsbery1-May-07 6:19 
GeneralRe: Capturing Network PC`s Desktop Pin
HassanKU1-May-07 7:04
HassanKU1-May-07 7:04 

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.