CONTENTS

Home
Updates
Software
Electronics
Music
Resume
Contact


YouTube
BlueSky
GitHub
LinkedIn


Michael Kohn

Kohn3D

Posted: April 16, 2023

Introduction

After coding Nintendo 64 Java, it inspired me to create a library for drawing 3D images. Originally I just wanted something that could generate animated GIFs, but it now also has the ability to output BMP and AVI. Currently the following features are implemented:

  • Draw lines
  • Draw rectangles
  • Draw triangles
  • Triangle 3D rotations
  • Triangle vertex shading
  • Z buffer
  • Alpha channel
  • Transparent pixels
  • Import BMP/GIF picture and draw simple scaled or scaled with pixel averaging
  • Texture mapping (coming soon)

Output

  • GIF / animated GIF
  • BMP (24 and 8 bit)
  • AVI (24 and 8 bit)

Currently there are no depedencies (no external libraries for things like BMP, AVI, GL, etc)... although a fun feature might be a "Video" option that can pull in frames from mp4's and such using libav (ffmpeg) or something. Or maybe also to output to mp4 using libav.

Source Code

git clone https://github.com/mikeakohn/kohn3d.git

Samples

Click to animate:

The cube above is the output of the draw_cube.cxx example program.

Explanation

Coming soon...

Copyright 1997-2025 - Michael Kohn