Skip to content

SaltyMold/3DView-OBJ-Viewer-for-Numworks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

3DView OBJ Viewer for the Numworks Calculator

Version Stars Forks License
Maintained Written In

This app is an 3D OBJ viewer that runs on the NumWorks Calculator.

3DView

πŸ“• Install the app

To install this app, you'll need to:

  1. Go to this page I have created : https://saltymold.github.io/3DView-OBJ-Viewer-for-Numworks/
  2. Upload your .obj file (or load a sample .obj file) and connect your calculator
  3. And you'r done, just click install and enjoy

βš™οΈ How to use the app

Key Action
Home Quit
Arrow Down 🟠 Go Down
Arrow Up 🟠 Go Up
Arrow Right 🟠 Go Right
Arrow Left 🟠 Go Left
OK 🟒 Zoom In
Back 🟒 Zoom Out
ToolBox πŸ”΅ Camera Up
SQRT πŸ”΅ Camera Down
Imaginary πŸ”΅ Camera left
Power πŸ”΅ Camera Right
Shift πŸ”΄ Debud Mode
Zero 🟣 Auto Camera Mode
Controls

Caution

Installing third-party applications may cause your calculator to crash. This is not dangerous, but you will lose your Python scripts. Please make sure to save them before launching the app..

πŸ’‘ How I created this application

This application works by converting a 3D .obj file into a binary format (.bin), either using the online converter or the Python script provided in the repository. When launched on the NumWorks calculator, the binary model is loaded into RAM. The app then performs a real-time perspective projection of the 3D model.

πŸ› οΈ Build the app

Requirements:

  • arm-none-eabi-gcc
  • nodejs 18.20.7 (install n for 18.20.7 version)
  • nwlink (with npm)
  • make 4.3
  • git (optional)

To build this sample app, you will need to install the embedded ARM toolchain and Node.js 18. The C SDK for Epsilon apps is shipped as an npm module called nwlink v0.0.16.

Debian

sudo apt install -y build-essential git gcc-arm-none-eabi binutils-arm-none-eabi nodejs npm && npm install -g n && sudo n 18 && npm install -g nwlink@0.0.16
git clone https://github.com/SaltyMold/3DView-OBJ-Viewer-for-Numworks.git
cd 3DView-OBJ-Viewer-for-Numworks
make clean && make build

Windows

You can install MSYS2 with all dependencies preinstalled from my C-App-Guide-for-Numworks or install all manually with the instructions bellow.

Install msys2 from the MSYS2 Github and open the msys2.exe file. Download the .zip from the Node Github, and extract it.

#MSYS2

pacman -Syu

#Replace with the reel node path
echo 'export PATH="/c/Users/UserName/AppData/Local/Programs/node-18.20.7-win32-x64:$PATH"' >> ~/.bashrc
source ~/.bashrc

npm install -g nwlink@0.0.16
nwlink --version
#PowerShell

#You can chose a diferent path
$env:ChocolateyInstall = "$env:LOCALAPPDATA\Programs\choco"
[System.Environment]::SetEnvironmentVariable("ChocolateyInstall", $env:ChocolateyInstall, "User")

Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

$env:Path += ";$env:ChocolateyInstall\bin"
[System.Environment]::SetEnvironmentVariable("Path", $env:Path, "User")
choco --version

choco install make --version=4.3 -y --force
make --version
#MSYS2

#Replace with the reel make path
echo 'export PATH="/c/Users/UserName/AppData/Local/Programs/choco/make/bin:$PATH"' >> ~/.bashrc 
source ~/.bashrc

pacman -S --noconfirm mingw-w64-x86_64-arm-none-eabi-gcc
arm-none-eabi-gcc --version

pacman -S --noconfirm git
git --version
git clone https://github.com/SaltyMold/3DView-OBJ-Viewer-for-Numworks.git

cd 3DView-OBJ-Viewer-for-Numworks
make clean && make build

You should now have a output/app.nwa file that you can distribute! Anyone can now install it on their calculator from the NumWorks online uploader.

πŸ› οΈ Build your own app

To build your own app, start by cloning the repository:

git clone https://github.com/SaltyMold/3DView-OBJ-Viewer-for-Numworks.git

Inside the project, you'll find eadk.h, which provides essential functions for interacting with the calculator. Modify main.c to implement your own code. Additionally, make sure to include an icon.png with dimensions 55Γ—56 pixels to serve as your app’s icon. Once your modifications are done, link the app with nwlink and enjoy your app!

🌟 Special thanks

I followed the guide from epsilon-sample-app-c to build this app.