Skip to main content
gamedev.net
🔒 Locked

Padding through mirroring

Started by serious_learner07 Feb 25, 2009 at 2:38 AM 1 replies 650+ views
Original Post
serious_learner07
serious_learner07
I am trying to develop enlarge an 2D array by padding column and row values in a mirror fashion. For example A = |1 2 3 4| |1 2 4 5| |1 4 5 7| After padding first 2 rows through mirroring, I should get new enlarged 2D array A' = |1 2 4 5| ------> Second row of A |1 2 3 4| ------> First rows of A |1 2 3 4| |1 2 4 5| |1 4 5 7| Now I pad and mirror first and second column to A', then new enlarged array A'' = |2 1 1 2 4 5| |2 1 1 2 3 4| |2 1 1 2 3 4| |2 1 1 2 4 5| |4 1 1 4 5 7| Can anyone suggest some ideas involved in doing this operation, My Function will recive the columns and rows to be repeated. For the time being, I am considering addition from the left(pre) and not post operation. Please suggest some ideas.
alvaro
alvaro
I don't understand what ideas you are waiting for. It looks like you know what you want to do. Just do it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.