Author Topic: 3D Wire Frame  (Read 93 times)

0 Members and 1 Guest are viewing this topic.

Offline bikemadness

  • Amiga 1200
  • ****
  • Posts: 318
  • Karma: 25
  • Hard players don't go home.
    • View Profile
3D Wire Frame
« on: May 07, 2026 »
A bit more work this time.

Yet to work out data.

Code: [Select]

point=16
dim r(point)
dim x(point)
dim y(point)
dim l(point)
dim d(point)
dim s(point)
dim m(point)
dim size(point)

for a=1 to point
r(a)=a*45*(pi/180)
l(a)=300
s(a)=2 rem couples with l(a) s(a)/l(a)
m(a)=.005
next a

for a=1 to 8
d(a)=-.35
next a

for a=9 to 16
d(a)=.35
next a

x=320
y=256

open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window

for a=1 to point
x(a)=cos(r(a))/(sin(r(a))+s(a))*l(a)+x
y(a)=d(a)/(sin(r(a))+s(a))*l(a)+y
next a

for a=1 to point
r(a)=r(a)+m(a)
if m(a)>360 m(a)=0
next a

for a=1 to 8
line x,y-150 to x(a),y(a)
next a

for a=9 to 16
line x,y+150 to x(a),y(a)
next a

setrgb 1,256,256,256
line x(1),y(1) to x(2),y(2)
line x(2),y(2) to x(3),y(3)
line x(3),y(3) to x(4),y(4)
line x(4),y(4) to x(5),y(5)
line x(5),y(5) to x(6),y(6)
line x(6),y(6) to x(7),y(7)
line x(7),y(7) to x(8),y(8)
line x(8),y(8) to x(1),y(1)
line x(9),y(9) to x(10),y(10)
line x(10),y(10) to x(11),y(11)
line x(11),y(11) to x(12),y(12)
line x(12),y(12) to x(13),y(13)
line x(13),y(13) to x(14),y(14)
line x(14),y(14) to x(15),y(15)
line x(15),y(15) to x(16),y(16)
line x(16),y(16) to x(9),y(9)
line x(1),y(1) to x(9),y(9)
line x(2),y(2) to x(10),y(10)
line x(3),y(3) to x(11),y(11)
line x(4),y(4) to x(12),y(12)
line x(5),y(5) to x(13),y(13)
line x(6),y(6) to x(14),y(14)
line x(7),y(7) to x(15),y(15)
line x(8),y(8) to x(16),y(16)

until (1=0)

Have a Yahappy day.
I don't know what is wrong with the world - but I know how to fix it.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: 3D Wire Frame
« Reply #1 on: May 08, 2026 »
Nice diamond :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline bikemadness

  • Amiga 1200
  • ****
  • Posts: 318
  • Karma: 25
  • Hard players don't go home.
    • View Profile
Re: 3D Wire Frame
« Reply #2 on: May 08, 2026 »
Thanks. I'm having trouble sorting colours.

The points are getting mixed up.
Have a Yahappy day.
I don't know what is wrong with the world - but I know how to fix it.