Artist Oric

The Oric video chip is not an easy beast to master, so any trick or method that allows to achieve nice visual results is welcome. Don't hesitate to comment (nicely) other people tricks and pictures :)
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Artist Oric

Post by peacer »



When I watch the video I said, It looks like Oric HIRES graphics demo :)

Just a quick try I wrote this simple code

Code: Select all

   10 HIRES                             
   20 X=20:Y=0                          
   30 X1=0:Y1=0                         
   35 IF X>0 AND X<240 THEN X2=X        
   36 IF Y>0 AND Y<200 THEN Y2=Y        
   40 CURSET X2,Y2,1                    
   60 X=X+SIN(X1)*140                   
   70 Y=Y+COS(Y1)*120                   
   80 Y1=Y1+1                           
   90 X1=X1+1                           
   95 IF X>0 AND X<240 THEN X3=X        
   96 IF Y>0 AND Y<200 THEN Y3=Y        
   97 DRAW X3-X2,Y3-Y2,1                
   100 GOTO 35         



Of course, I failed . But changing the parameters , program draws different nice patterns.

Image
Image
Image


So, here's a challenge to you :) Can you make your Oric draw as that artist do on the paper?
User avatar
Badger
Pilot Officer
Posts: 84
Joined: Sat Sep 22, 2018 10:04 am
Location: Wigan, England

Re: Artist Oric

Post by Badger »

I saw this and thought what an interesting challenge.

I started out by making a pendulum swing on a string which is the code below.
I would advise running this at at least 8X acceleration in oricutron, although with the 2 draw commands and the wait removed it is not that bad on 1Mhz.

Code: Select all

10 HIRES
20 GR=9.81:REM ACCELERATION DUE TO GRAVITY
30 SP=0 : REM INITIAL SPEED
40 LX=1 : REM CONTROLS AMPLITUDE X-AXIS
50 LY=1 : REM AMPLITUDE OF Y-AXIS
60 TH=PI/2 : REM START ANGLE
70 RD=110 : REM RADIUS OR LENGTH OF PENDULUM
80 PX=120 : REM X-AXIS CONNECTION OF PENDULUM
90 PY=20 : REM Y-AXIS CONNECTION OF PENDULUM
100 REM MAIN LOOP FOR CALC AND DRAWING
110 NX=PX+LX*RD*SIN(TH)
120 NY=PY-LY*RD*COS(TH)
130 CURSET NX,NY,0
140 CIRCLE 2,1
150 REM REMOVE THIS DRAW FOR SMOTHER ANIM
160 DRAW PX-NX,PY-NY,1
170 AC=GR*SIN(TH)/LX/RD
180 SP=SP+AC/RD
190 TH=TH+SP
200 REM REMOVE THIS WAIT IF DRAWS REMOVED
210 WAIT 10
220 CURSET NX,NY,0
230 CIRCLE 2,0
240 REM REMOVE THIS DRAW FOR SMOTHER ANIM
250 DRAW PX-NX,PY-NY,0
260 GOTO 100
The next step is to remove the y-axis pendulum calculation (ie NY=PY) which make it look like you're looking down on the pendulum from above.
So the ball would appear to move just left and right along an x-axis with simple harmonic motion.

Changing line 120 to 120 NY-=PY gives the effect described above.

So the next step would be to calculate a new value of Y. Well this is just another simple harmonic motion with a different frerquency to the x-axis frequency and to remnove the "undraw" commands.

Hopefully that will be the next post :)
flag_uk Amateurs built the Ark, Professionals built the Titanic.
User avatar
Badger
Pilot Officer
Posts: 84
Joined: Sat Sep 22, 2018 10:04 am
Location: Wigan, England

Re: Artist Oric

Post by Badger »

Here is the next version. Plotting 2 different frequencies of simple harmonic motion. One on x-axis, one on y-axis.
The 2 acceleration variables are input on running GX and GY.

Not quite what the OP was looking for but I think I got fairly close (ish). :D

It's very slow so I would recomend at least 8Mhz on oricutron.

Code: Select all

10 HIRES
20 SX=0 : REM INITIAL X SPEED
30 LX=1 : REM CONTROLS AMPLITUDE X-AXIS
40 TX=PI/2 : REM START ANGLE
50 RX=110 : REM RADIUS OR LENGTH OF PENDULUM
60 PX=120 : REM X-AXIS CONNECTION OF PENDULUM
70 SY=0
80 PY=100 : REM Y-AXIS CONNECTION OF PENDULUM
90 LY=1 : REM AMPLITUDE OF Y-AXIS
100 RY=90 : REM RADIUS OF Y-AXIS
110 TY=PI/2
120 INPUT "X-Axis Acceleration:";GX
130 INPUT "Y-Axis Acceleration:";GY
140 REM MAIN LOOP FOR CALC AND DRAWING
150 NX=PX+LX*RX*SIN(TX)
160 NY=PY+LY*RY*SIN(TY)
170 CURSET NX,NY,1
190 AX=GX*SIN(TX)/LX/RX
200 AY=GY*SIN(TY)/LY/RY
210 SX=SX+AX/RX
220 SY=SY+AY/RY
230 TX=TX+SX
240 TY=TY+SY
250 GOTO 140
flag_uk Amateurs built the Ark, Professionals built the Titanic.
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Artist Oric

Post by peacer »

So cool and explanatory :)

Thank you for your efforts :) You really did it :)

I am trying to find closest pattern of what he did with ink :)

Here I got a turkish flag :)
Image

and honeycomb
Image
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Artist Oric

Post by Dbug »

Imo, the "easiest" way to simulate what he did, would be to implement a version of curset/draw that can accept coordinates out of the screen and properly clip the, and potentially also have 0,0 in the center of the screen.

Doing that, you could easily use whatever trigonometric function you want, with a very large radius that could change over time, and the HIRES screen would only show the visible portion.
User avatar
Badger
Pilot Officer
Posts: 84
Joined: Sat Sep 22, 2018 10:04 am
Location: Wigan, England

Re: Artist Oric

Post by Badger »

peacer wrote: Thu May 14, 2020 9:34 pm So cool and explanatory :)

Thank you for your efforts :) You really did it :)
Thankyou, I enjoyed the challenge. :D

My attempt isnt quite correct, but does produce interesting patterns.

The benefit of being able to overclock the emulator is huge as I wouldnt want to run the basic program on real hardware :D

I'll keep trying , and will look at Dbug's suggestion on how to do it too.
flag_uk Amateurs built the Ark, Professionals built the Titanic.
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Artist Oric

Post by peacer »

Waiting to hear more :)
User avatar
kenneth
Squad Leader
Posts: 515
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

Re: Artist Oric

Post by kenneth »

I wrote this, you can try it at 64x overclock. :mrgreen:

Image
Attachments
LEAKINGPAINT.tap
(192 Bytes) Downloaded 274 times
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Artist Oric

Post by peacer »

Perfect !!. Thank you :)

I added a few lines to modify increment of andgle and decrement of radiuses along with adding draw commant to draw between dots. Of course the result is a little bit more "coarse" but it can run very rapidly without any overclocking in 1 MHZ . I think it gives the idea :)

My result is like this :)
Image

Code: Select all

   
                                  
   10 HIRES:PAPER4                      
   20 R=100                             
   100 X=120+R*SIN(A)+COS(A+D)*R/2      
   110 Y=100+R*COS(A)+SIN(A+D)*R/2      
   115 IFX<0ORY<0ORX>239ORY>199THEN130  
   116 CURSETX,Y,1                      
   117 IFX1<0 THEN X1=0                 
   118 IFY1<0 THEN Y1=1                 
   119 IFX1>239 THEN X1=239             
   120 IFY1>199 THEN Y1=199             
   125 DRAW X1-X,Y1-Y,1                 
   130 A=A+.4:D=D+.02:R=R-.1:IFR<10THENEND                                    
   131 X1=X:Y1=Y                        
   140 GOTO100                          
                            
Original code in line 130 is :

130 A=A+.02:D=D+.001:R=R-.005:IFR<10THENEND

I modified this to

130 A=A+.4:D=D+.02:R=R-.1:IFR<10THENEND
ARTIST.tap
(295 Bytes) Downloaded 266 times
User avatar
kenneth
Squad Leader
Posts: 515
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

Re: Artist Oric

Post by kenneth »

Nice ! 8)
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: Artist Oric

Post by jbperin »

It makes me think of Lissajous' contribution to laws of harmony.
IMG_20200525_185022.jpg
IMG_20200525_185022.jpg (3.92 MiB) Viewed 7306 times
IMG_20200525_185045.jpg
IMG_20200525_185045.jpg (4 MiB) Viewed 7306 times
Post Reply