Page 1 of 1
Artist Oric
Posted: Thu May 14, 2020 3:53 pm
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.
So, here's a challenge to you
Can you make your Oric draw as that artist do on the paper?
Re: Artist Oric
Posted: Thu May 14, 2020 8:58 pm
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
Re: Artist Oric
Posted: Thu May 14, 2020 9:32 pm
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).
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
Re: Artist Oric
Posted: Thu May 14, 2020 9:34 pm
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
and honeycomb
Re: Artist Oric
Posted: Fri May 15, 2020 6:08 am
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.
Re: Artist Oric
Posted: Fri May 15, 2020 9:38 am
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.
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
I'll keep trying , and will look at Dbug's suggestion on how to do it too.
Re: Artist Oric
Posted: Fri May 15, 2020 3:57 pm
by peacer
Waiting to hear more
Re: Artist Oric
Posted: Sat May 16, 2020 12:30 am
by kenneth
I wrote this, you can try it at 64x overclock.
Re: Artist Oric
Posted: Sat May 16, 2020 2:20 am
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
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
Re: Artist Oric
Posted: Sat May 16, 2020 2:25 pm
by kenneth
Nice !
Re: Artist Oric
Posted: Mon May 25, 2020 6:03 pm
by jbperin
It makes me think of Lissajous' contribution to laws of harmony.
- IMG_20200525_185022.jpg (3.92 MiB) Viewed 7426 times
- IMG_20200525_185045.jpg (4 MiB) Viewed 7426 times