![]() |
Forum Index : Microcontroller and PC projects : in wich topics are examples of mathematic graphics with picomite ?
Author | Message | ||||
amiga Newbie ![]() Joined: 08/05/2025 Location: BelgiumPosts: 21 |
Hi, i don't remember in wich topics are examples of mathematic graphics with picomite . i will be very happy if someone refresh my 1 bit memory,and fun to run them in my new olimex pico(with WS rp2350). Nice day or nice night @+ Alfa (from Belgium near Francorchamp .. the wonderful circuit of Race car .. this week race of 24H) |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5023 |
Hi amiga, Can you explain. Are you interested in 3D rotation? Or just graphing a mathematical formula. Volhout PicomiteVGA PETSCII ROBOTS |
||||
mathom Newbie ![]() Joined: 15/02/2025 Location: United StatesPosts: 4 |
Perhaps this? https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=17161#224850 |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2522 |
I'm interested in 3d rotation, any examples in mmbasic please? |
||||
amiga Newbie ![]() Joined: 08/05/2025 Location: BelgiumPosts: 21 |
Just graphing some mathematical formula ... make a demo of Picomite for kids 12-14 years old .. @+ Amiga |
||||
amiga Newbie ![]() Joined: 08/05/2025 Location: BelgiumPosts: 21 |
yes that's .. now i can make a demo .. pictures better than words .. Thanks @+ Amiga |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5023 |
This is Peter's demo for 3D rotation. It is amazing how fast PicoMite can do this (below program is tested on RP2040 VGA (mode 2) but should also work on other resolutions. There is an explanation how things work in the CMM2 graphics manual. This is just to show that the same it works on pico. I already played with a "Cobra" from the game "Elite"... but that is not finished yet. the goal was to adjust yaw pitch and roll from a Nunchuck controller (it has built in acceleration sensors). 'rotating cube 'some changes where made to remove a face, and create a "hollow" cube. MODE 2 FRAMEBUFFER create Dim FLOAT vertices(2,7) = (-1,1,-1, 1,1,-1, 1,-1,-1, -1,-1,-1, -1,1,1, 1,1,1, 1,-1,1, -1,-1,1) ' Dim INTEGER facecount(4)=(4,4,4,4,4) '1 face less Dim INTEGER facecount(5)=(4,4,4,4,4,4) ' Dim INTEGER faces(19)=(0,1,2,3, 1,5,6,2, 0,4,5,1, 5,4,7,6, 2,6,7,3) '1 face less Dim INTEGER faces(23)=(0,1,2,3, 1,5,6,2, 0,4,5,1, 5,4,7,6, 2,6,7,3, 0,3,7,4) Dim INTEGER colours(6)=(RGB(blue), RGB(green), RGB(yellow), RGB(cyan), RGB(red), RGB(magenta), RGB(yellow)) ' Dim INTEGER edge(4)=(6,6,6,6,6) '1 face less Dim INTEGER edge(5)=(6,6,6,6,6,6) ' Dim INTEGER fill(4)=(0,1,2,3,4) '1 face less Dim INTEGER fill(5)=(0,1,2,3,4,5) ' Dim n=1, nv=8, nf=5, camera=1 '1 face less Dim n=1, nv=8, nf=6, camera=1 'enlarge to visible proportions Math SCALE vertices(), 100, vertices() Draw3D CREATE n, nv, nf, camera, vertices(), facecount(), faces(), colours(), edge(), fill() Dim FLOAT yaw=Rad(1), pitch=Rad(2), roll=Rad(0.5) Dim FLOAT q(4) Dim INTEGER viewplane=300 Draw3D camera n, viewplane Dim INTEGER x=0, y=0, z=500 FRAMEBUFFER write f Draw3D SHOW n, x, y, z Do Math Q_EULER yaw, pitch, roll, q() Draw3D ROTATE q(),n Draw3D show n,x,y,z Inc yaw,Rad(1) Inc pitch,Rad(2) Inc roll,Rad(0.5) FRAMEBUFFER copy f,n Loop Edited 2025-07-01 23:41 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2522 |
thanks for the code Volhout, it works. I had to put pause 20 in the do loop cos it was too fast to see.! |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2522 |
better than no example but not an easy thing to understand. the example is filled colour not just wired points. thanks again. stan |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2522 |
looks good hdmi OPTION RESOLUTION 1024x768 mode 3 |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |