Skip to content

Commit

Permalink
Updated 'samples' with @sprezzo changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
DualBrain committed Jun 10, 2022
1 parent 5221018 commit 07d0c8a
Show file tree
Hide file tree
Showing 135 changed files with 214 additions and 34,807 deletions.
161 changes: 80 additions & 81 deletions samples.md

Large diffs are not rendered by default.

50 changes: 0 additions & 50 deletions samples/3d-cube/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,56 +18,6 @@ I'd rather make another 25 liner. ;*)
Relsoft 2003
```

### Code

#### 3dcube25.bas

```vb

'3d cube
'polygon filled using paint. ;*)
'I could probably shorten the code in less than 20 lines but
'I'd rather make another 25 liner. ;*)
'Relsoft 2003

$NoPrefix

$Resize:Smooth
Screen 9, , 1, 0
FullScreen SquarePixels , Smooth

Dim CubeM!(8, 7), CubeV(12, 2)
For V = 1 To 8 + 12
If V < 9 Then Read CubeM!(V, 0), CubeM!(V, 1), CubeM!(V, 2) Else Read CubeV(V - 8, 0), CubeV(V - 8, 1), CubeV(V - 8, 2)
Next
Do
ax! = (ax! + .01) * -(ax! < 6.283186)
ay! = (ay! + .01) * -(ay! < 6.283186)
az! = (az! + .01) * -(az! < 6.283186)
For I = 1 To 8
CubeM!(I, 6) = (256 * ((CubeM!(I, 0) * (Cos(ay!) * Cos(az!)) + CubeM!(I, 1) * (Cos(ax!) * -Sin(az!) + Sin(ax!) * Sin(ay!) * Cos(az!)) + CubeM!(I, 2) * (-Sin(ax!) * -Sin(az!) + Cos(ax!) * Sin(ay!) * Cos(az!)))) \ (256 - ((CubeM!(I, 0) * (-Sin(ay!)) + CubeM!(I, 1) * (Sin(ax!) * Cos(ay!)) + CubeM!(I, 2) * (Cos(ax!) * Cos(ay!)))))) + 320
CubeM!(I, 7) = -(256 * ((CubeM!(I, 0) * (Cos(ay!) * Sin(az!)) + CubeM!(I, 1) * (Cos(ax!) * Cos(az!) + Sin(ax!) * Sin(ay!) * Sin(az!)) + CubeM!(I, 2) * (-Sin(ax!) * Cos(az!) + Cos(az!) * Sin(ay!) * Sin(az!)))) \ (256 - ((CubeM!(I, 0) * (-Sin(ay!)) + CubeM!(I, 1) * (Sin(ax!) * Cos(ay!)) + CubeM!(I, 2) * (Cos(ax!) * Cos(ay!)))))) + 175
Next
Line (0, 0)-(639, 350), 0, BF
For I = 1 To 12
If (CubeM!(CubeV(I, 2), 6) - CubeM!(CubeV(I, 0), 6)) * (CubeM!(CubeV(I, 1), 7) - CubeM!(CubeV(I, 0), 7)) - (CubeM!(CubeV(I, 1), 6) - CubeM!(CubeV(I, 0), 6)) * (CubeM!(CubeV(I, 2), 7) - CubeM!(CubeV(I, 0), 7)) < -256 Then
Line (CubeM!(CubeV(I, 0), 6), CubeM!(CubeV(I, 0), 7))-(CubeM!(CubeV(I, 1), 6), CubeM!(CubeV(I, 1), 7)), I + 2
Line (CubeM!(CubeV(I, 1), 6), CubeM!(CubeV(I, 1), 7))-(CubeM!(CubeV(I, 2), 6), CubeM!(CubeV(I, 2), 7)), I + 2
Line (CubeM!(CubeV(I, 2), 6), CubeM!(CubeV(I, 2), 7))-(CubeM!(CubeV(I, 0), 6), CubeM!(CubeV(I, 0), 7)), I + 2
Paint ((CubeM!(CubeV(I, 0), 6) + CubeM!(CubeV(I, 1), 6) + CubeM!(CubeV(I, 2), 6)) \ 3, (CubeM!(CubeV(I, 0), 7) + CubeM!(CubeV(I, 1), 7) + CubeM!(CubeV(I, 2), 7)) \ 3), I + 2
End If
Next
PCopy 1, 0
Limit 60
Loop Until InKey$ <> ""

System 0

Data -80,-80,-80,80,-80,-80,80,80,-80,-80,80,-80,-80,-80,80,80,-80,80,80,80,80,-80,80,80
Data 5,1,8,1,4,8,6,5,7,5,8,7,2,6,3,6,7,3,1,2,4,2,3,4,4,3,8,3,7,8,5,6,1,6,2,1

```

### File(s)

* [3dcube25.bas](src/3dcube25.bas)
Expand Down
8 changes: 4 additions & 4 deletions samples/3d.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## SAMPLES: 3D

**[Julia Rings](3d-cube/index.md)** <sup>v2003</sup>
**[Julia Rings](3d-cube/index.md)**

[🐝 Relsoft](relsoft.md) πŸ”— [3d](3d.md), [cube](cube.md)

Expand All @@ -14,19 +14,19 @@

'{A little rotating sphere, by Glen Jeh, 8/12/1994, use freely} '{Try messing with the constants....

**[Helicopter Rescue](helicopter-rescue/index.md)** <sup>v2.23</sup>
**[Helicopter Rescue](helicopter-rescue/index.md)**

[🐝 TrialAndTerror](trialandterror.md) πŸ”— [game](game.md), [3d](3d.md), [flight](flight.md)

================================================================================= H E L ...

**[Maptriangle in 3D](maptriangle-in-3d/index.md)** <sup>v3D Rotation</sup>
**[Maptriangle in 3D](maptriangle-in-3d/index.md)**

[🐝 Petr](petr.md) πŸ”— [3d](3d.md), [maptriangle](maptriangle.md)

A demo to show rotation in 3D using MAPTRIANGLE 3D, without direct OpenGL statements. Librarian'...

**[Texel Raytracer](texel-raytracer/index.md)** <sup>v2004</sup>
**[Texel Raytracer](texel-raytracer/index.md)**

[🐝 Antoni Gual](antoni-gual.md) πŸ”— [3d](3d.md), [ray tracing](ray-tracing.md)

Expand Down
14 changes: 7 additions & 7 deletions samples/9-lines.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

## SAMPLES: 9 LINES

**[Lissajous Screensaver](lissajous-screensaver/index.md)** <sup>v2003</sup>
**[Lissajous Screensaver](lissajous-screensaver/index.md)**

[🐝 Antoni Gual](antoni-gual.md) πŸ”— [screensaver](screensaver.md), [9 lines](9-lines.md)

'Lissajous by Antoni Gual 'for Rel's 9 LINER contest at QBASICNEWS.COM 1/2003 '-----------------...

**[Mandala 9 Line](manadla/index.md)** <sup>v2003</sup>
**[Mandala 9 Line](manadla/index.md)**

[🐝 Antoni Gual](antoni-gual.md) πŸ”— [screensaver](screensaver.md), [9 lines](9-lines.md)

'Mandala by Antoni gual 'for Rel's 9 LINER contest at QBASICNEWS.COM 1/2003 '-------------------...

**[Mandelbrot](mandelbrot-set-2003/index.md)** <sup>v2003</sup>
**[Mandelbrot](mandelbrot-set-2003/index.md)**

[🐝 Antoni Gual](antoni-gual.md) πŸ”— [fractal](fractal.md), [mandelbrot](mandelbrot.md), [9 lines](9-lines.md)

'MANDELBROT by Antoni Gual 2003 'for Rel's 9 LINER contest at QBASICNEWS.COM 1/2003 '-----------...

**[Mandala 9 Line](pattern/index.md)** <sup>v2003</sup>
**[Mandala 9 Line](pattern/index.md)**

[🐝 Antoni Gual](antoni-gual.md) πŸ”— [screensaver](screensaver.md), [9 lines](9-lines.md)

Expand All @@ -32,19 +32,19 @@

' OPTIMIZED :) rotozoomer in 9 lines by Antoni Gual 'for Rel's 9 LINER contest at QBASICNEWS.COM...

**[Starfield 9 Line](starfield/index.md)** <sup>v2003</sup>
**[Starfield 9 Line](starfield/index.md)**

[🐝 Antoni Gual](antoni-gual.md) πŸ”— [starfield](starfield.md), [9 lines](9-lines.md)

'Starfield by Antoni gual 'for Rel's 9 LINER contest at QBASICNEWS.COM 1/2003 '-----------------...

**[Twirl](twirl/index.md)** <sup>v1/2003</sup>
**[Twirl](twirl/index.md)**

[🐝 Antoni Gual](antoni-gual.md) πŸ”— [screensaver](screensaver.md), [9 lines](9-lines.md)

'Twirl by Antoni Gual, from an idea by Steve Nunnaly 'for Rel's 9 LINER contest at QBASICNEWS.CO...

**[Vortex](vortex/index.md)** <sup>v1/2003</sup>
**[Vortex](vortex/index.md)**

[🐝 Antoni Gual](antoni-gual.md) πŸ”— [screensaver](screensaver.md), [9 lines](9-lines.md)

Expand Down
Loading

0 comments on commit 07d0c8a

Please sign in to comment.