Ok , I know what I am going to do :).
So I have split my projet into 4 parts...
*Part 1:*
I need to find a way to store pixels in a 3D Euclidean space. (X,Y,Z) with
X,Y and Z *INTEGER*
I can do this with a 3xXxYxZ Array{Uint8,4}.
But I will need to know if a (X,Y,Z) position is empty or not (fast) and
Ultimatly I woud like to have only the list of the pixels that exist really
( if the (X, Y, Z) position is empty I don't need to store this information
into my data)
*Part 2:*I need a fonction who will take two arguments and give me a
picture.
Like this:
#pos is the position (x,y,z) of the camera and vec is the direction (x,y,z)
looking by the camera
function camera_view(pos,vec)
#explore the data from *part 1* and return a "3x600x800
Array{Uint8,3}" (for a 800x600 resolution screen)end
*Part 3:*
For this part what i need is to create a loop that display and refresh on
the screen the returned picture of the function from
*part 2*Something like this:
img = imread("mypicture.bmp")
display(img, pixelspacing = [1,1])
when (camera is moving)
img.data = camera_view(pos,vec)
display(img, pixelspacing = [1,1])
end
*Part 4:*Use the keybord and the mouse to trigger the loop from *part 3*
and use the right (pos and vec) in the camera_view(pos,vec) function
*-----------------------------The end------------------------------*I
create this topic to answer the part3
so lets forget about all the other part.
My question transform to:
*HOW CAN I DISPLAY x in a windows or using all the screenlike
this:LOOP x = **rand(Uint8,3,800,600)*
*Display (x)*
*END*
and how can I refresh my windows/screen with a new x the fastest way
* (the point here is that I want to make a movie with random bitmaps)*idealy
without using any Package/library (writting all the code lines from
nothing)
I am doing this to LEARN I know there are clever programmers outhere who
made perfect tools for 3D.
I will post my work when I will get closer to the end haha.
Thanks again