Question: I have an issue with Z-Buffer or Depth-Buffer method. I tried to use it in my code and I did but the problem is some
I have an issue with Z-Buffer or Depth-Buffer method.
I tried to use it in my code and I did but the problem is some part of the graph don't come correctly and also when you rotate the image some part become funny.
The correct image should be:

But when I use my code this is what I got at the beginning before I rotate the image:

and when I rotate the image quite sometimes:

You can find all the files at GITHUB ( https://github.com/abderisaq/cse ):
This is my classes:
(TCSS458Paint.java) ===== This is the main program =============================
https://github.com/abderisaq/cse/blob/master/TCSS458Paint.java
(Matrix4x4.java) ============================================================
https://github.com/abderisaq/cse/blob/master/Matrix4x4.java
(Point4D.java) ==============================================================
https://github.com/abderisaq/cse/blob/master/Point4D.java
(ScanLine.java) =============================================================
https://github.com/abderisaq/cse/blob/master/ScanLine.java
(templeSolid.txt) ============ This is the test file ===========================
https://github.com/abderisaq/cse/blob/master/templeSolid.txt
Thanks a lot
Transcribed image text
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
