Skip to content

Phabr1945/Graphics-Driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Graphics-Driver

A graphics driver made by an idiot for an idiot.

Core features

Take a strictly defined 4d shape and put it on a 2d screen.

Why?

I'm an insane idiot who happens to be somewhat smart in asking google for the answers.

How?

It takes a 4d shape, converts it into 3d, then using steps explained here, it displays it on a 2d screen.

In detail

I take a point defined in a list of variables x,y,z,w, then create a new list with orthogonal projection, ignoring w to create x,y,z. After that, I reduce the x,y,z proportional to a fraction 1/w. Look at example 1. how to make fractions

examples

Example 1:

point values:

_example_4D_point_ = {
    "x": 1,
    "y": 1,
    "z": 1,
    "w": 1,
}

point conversion and illegal python move

def _example_point_1_():
    p1 = x / w
    p2 = y / w
    p3 = z / w
    _example_point_1_.pts = [p1,p2,p3]

run the function to use a local var outside of the function

_example_point_1_()

print the converted point values

print("3D point 1",_example_point_1_.pts)

output:

> 3D point 1 [1.0, 1.0, 1.0]

Sources

License:

Graphics-Driver: A graphics driver made by an idiot for an idiot.
Copyright (C) <2024>  <Ryan Britton Maxson, Phbar1945, Райан Махъссон>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

About

take a 4d shape and display on a 2d screen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published