- C 89.6%
- Roff 7.5%
- Makefile 2.1%
- Shell 0.6%
- Raku 0.2%
| ext | ||
| geo | ||
| maps | ||
| .gitignore | ||
| draw.c | ||
| draw.h | ||
| fdf.c | ||
| fdf.h | ||
| init.c | ||
| init.h | ||
| io.c | ||
| io.h | ||
| lambdas.c | ||
| lambdas.h | ||
| load.c | ||
| load.h | ||
| main.h | ||
| Makefile | ||
| parser.c | ||
| parser.h | ||
| README.md | ||
This project has been created as part of the 42 curriculum by jmaxwell.
FdF
description
a wireframe 3d renderer
bonus
we have implemented :
- zooming
- camera controls
- position
- rotation
- toggling betwen static and dynamic projections
- isometric (static)
- perspective (dynamic)
as camera rotation is currently locked to the vertical axis, we are unable to generalise isometric projection to a subset of angles in perspective.
instructions
usage
| key | action | description |
|---|---|---|
p |
switch rendering modes | toggle between perspective and isometric |
w |
move forwards | +z |
s |
move backwards | -z |
d |
move rightwards | +x |
a |
move leftwards | -x |
Space |
move upwards | +y |
Shift |
move downwards | -y |
q |
rotate clockwards | +x |
e |
rotate anticlockwards | -x |
Right |
rotate rightwards | +y |
Left |
rotate leftwards | -y |
Up |
rotate upwards | +z |
Down |
rotate downwards | -z |
Scroll Up |
zoom in | increments the final focal length |
Scroll Down |
zoom out | decrements the final focal length |
compilation
for a limited, static perspective only :
make
to unlock camera rotation :
make bonus
resources
peers
benji (bribot)
helping me realise i was passing the wrong pointer to mlx_key_hook as
mlx_hook takes the connection identifier of the whole program, whereas
the former acts on a per window basis and therefore requires a different
pointer, that of the relevant window...
sofus (@sofus)
guiding me through the minilibx's fuzzy documentation
louka (ldeplace)
you're supposed to call destructors as it turns out -and free the mlx pointer ;p
remi (@remi)
debugging draw_segment and providing insight and support
and all my friends for carrying me through turmoil in providing mental support
documentation
harm-smits 42docs tronche xlib gnu make wikipedia
-
do not mirror this repo or host a fork of it on github for reasons outlined here, none of the code present here should be hosted on github in any way, whether partially or totally. ↩︎
-
the following is certified human labour the entirety of the code in this repo was designed, implemented and tested entirely by humans, without the involvement of llms at any stage of the process, besides during research in the form of unprompted search engine summaries. whenever possible, its use was avoided. any trace of ai involvement is either coincidental or accidental, and beyond my knowledge. ↩︎
-
due to the policy currently in place at time of redaction, the unexplictly authorised publication of 42 subjects to individuals who may potentially lack the privilege to access them otherwise remains prohibited. as such, i will not be saving a copy of the relevant subject in this repository, however much i wish i could. ↩︎
