Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

iterate a 2d array in a circular manner

Status
Not open for further replies.

kidi3

Full Member level 1
Full Member level 1
Joined
Mar 31, 2013
Messages
98
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,350
Is it even possible and if so then how?
how do i iterate a 2d array such that at each angle degree I output one strip, located on that angle showed.. ex.

for 0 degrees will # be outputted.
Code:
 __  __ __ __ __
|    |   |    |   |    |
|    |   |#  |   |    | 
|__|__|__|__|__| 
|    |   |    |   |    |
|    |   |#  |   |    |
|__|__|__|__|__| 
|   |    |    |   |    |
|   |    |    |   |    |
|__|__|__|__|__|

and so on for different different degrees.. the question, is how do compute the array position for the different angles.. for example for 45 degrees and so on..
 

use trigonometry and cast floats to ints?
 
  • Like
Reactions: kidi3

    kidi3

    Points: 2
    Helpful Answer Positive Rating
well.. the problem is how?

I quite sure that the math is simple, but can't get my head around it..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top