0

I have a 3D array of numbers from 0 to 9 to represent objects in a space, where

0 - empty space, 1 - space boundary, 2 - item 1, 3 - item 2, ...

Is it possible to assign colours to each number and output these as part of a 2D isometric view (viewed from a certain angle) of a 3D objects? (with 0 being transparent)

I would like a 3D representation of the object i have described.

I understand there is a concept for RGB colours but that only serves to populate the array with 3 colours, which means i have to break down my array further?

sorry i am very new to CS in general with a background in mechanical engineering so i am trying to learn.

1 Answers1

0

The simplest way would be to use a plotting library like matplotlib. You will only be able to draw simple shapes but that is enough for the problem you have.

See this question for an example of how you can plot a 3d array.

Matplotlib is a python library, if you are using a different language I'm sure it has a similar library available.

Community
  • 1
  • 1
Gerard Abello
  • 658
  • 3
  • 7