No description
  • C 89.6%
  • Roff 7.5%
  • Makefile 2.1%
  • Shell 0.6%
  • Raku 0.2%
Find a file
2026-05-03 12:17:51 +02:00
ext expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
geo #34 2026-05-03 11:26:10 +02:00
maps mostly normed 2026-05-03 08:27:58 +02:00
.gitignore expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
draw.c mostly normed 2026-05-03 08:27:58 +02:00
draw.h mostly normed 2026-05-03 08:27:58 +02:00
fdf.c #3 fully normed 2026-05-03 10:58:11 +02:00
fdf.h expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
init.c expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
init.h expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
io.c expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
io.h expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
lambdas.c expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
lambdas.h expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
load.c Merge remote-tracking branch 'refs/remotes/pelote/master' into ft 2026-05-03 12:17:51 +02:00
load.h mostly normed 2026-05-03 08:27:58 +02:00
main.h expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
Makefile expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
parser.c mostly normed 2026-05-03 08:27:58 +02:00
parser.h expect system installation of mlx, cleanup & norm 2026-05-03 10:53:56 +02:00
README.md bonus, zoom keybinds, compilation 2026-05-03 11:13:27 +02:00

This project has been created as part of the 42 curriculum by jmaxwell.

FdF

jmaxwell@42cursus/fdf nogithub1 ai free content 2

description

a wireframe 3d renderer

subject3 project repository

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


  1. 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. ↩︎

  2. 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. ↩︎

  3. 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. ↩︎