T.R | Title | User | Personal Name | Date | Lines |
---|
319.1 | | PIPA::JANZEN | | Wed Jul 24 1985 10:00 | 14 |
| here are good numbers:
1.37
1
1
1
1
1
0
3.5
5.5
2
.01
.02
Tom
|
319.2 | | PIPA::JANZEN | | Sat Jul 27 1985 14:26 | 27 |
| People without a good sense for physics seem to be having trouble
making this program do interesting things, so i include some numbers for
good pictures here. Also, a Regis person suggested improvements in the
program to eliminate redundant characters. for example, the "v" in
the vector command v[ x , y ] is needed only the first time, that is,
when n = 2 in the big loop. Also, the should be a semicolon after
the vector command since without it you send extra linefeeds/CR.
Without a BASIC book, I get run-time errors on a print using statement
to get rid of the spaces in the numbers, screenx and screeny, but my
friend recommended that too. Also, I estimated the speed of the
program and it now interogates the user for the length of the run.
here are some good numbers for pendula.
Flower
1.22 1 1 1 1 1 0 2 3 1 0 0 end.
ball of string
1.01 1 1 1 1 1 0 1 2 4.5 0 0
45 seconds. a modified program includes the length of run in seconds.
end.
Xtal
1.22 100 1 1 1 1 0 4 2 6 0 0
2 seconds.
Tom
|
319.3 | | PIPA::JANZEN | | Sat Jul 27 1985 14:29 | 6 |
| space.txt
1.01 1 1 1 1 1 0 1 2 4.5 0 0 56.5 end.
lissajous
10 1 0 1.9 1.9 0 0 0 0 0 0 0 end.
Tom
|
319.4 | | SPRITE::OSMAN | | Mon Jul 29 1985 14:33 | 12 |
| I have a hard time transfering all those numbers from my screen to either
file or head, and then back to the program in order to try out the pictures.
How about a version of the program that lets me optionally select a choice
such as "ball" or "lissajous" or "xtal", and the program draws it.
Or perhaps merely a version of the program that does 30 seconds of each
of the ten or so acknowledged "nice pictures".
Thanks.
/Eric
|
319.5 | | VAXINE::LPIPER | | Mon Jul 29 1985 14:56 | 7 |
|
WELL, MY HAT IS CERTAINLY OFF TO THOSE WHO CAN CREATE PROGRAMS SUCH AS THIS!
BEING A PERSON THAT HAS A HARD TIME PROGRAMMING A MICROWAVE OVEN, I AM IMPRESSEDWITH ALL OF THIS, BUT I DID LEARN SOMETHING FROM COPYING (AND USING) THIS PROG-
RAM.
JUST THOUGHT THAT TOM JANZEN MIGHT LIKE TO HEAR (SEE?) THE ABOVE.
|
319.6 | | PIPA::JANZEN | | Tue Jul 30 1985 13:22 | 9 |
| re: -1
After dead silence for so long, I enjoyed your response.
I wish the mathies would say something, but it's probably too close to the
physical world for them. I worked hard to make the program close to
the actual pendula in the musuem, and to be very general.
I'll let you know here if I make other versions.
You can send me mail if you want the current version, which asks
for the stuff mentioned a few replies back.
Tom
|
319.7 | | BAGELS::ROSENBAUM | | Tue Jul 30 1985 23:55 | 13 |
| I've enjoyed it as well.
Re: .4:
What I did, was extract the note into a file, edit a little (remove
the header, put each number on a separate line, and then:
$define/user sys$input file.ext (your extracted filename)
$Run pend (or whatever you call it)
Actually i wrote a two line command procedure that does the above.
__Rich
|
319.8 | | PIPA::JANZEN | | Wed Jul 31 1985 14:05 | 19 |
| The new pendula programs are as follows:
PIPA""::STD:[JANZEN.PUBLIC]PENDULA.BAS
PIPA""::STD:[JANZEN.PUBLIC]EASYPEND.BAS
PENDULA.BAS has been improved as follows:
o The source code is formatted for for better visual acuity.
o The code is more compact.
o Extraneous and redundant characters have been eliminated.
o The user is asked for the length of the run of the program.
0 The coordinates have been squared up. Circles are circular now.
Note that the user should time the program on their system and adjust
the variable SPEED accordingly although this isn't necessary to run it.
EASYPEND.BAS now, as requested, has a menu of four drawings to draw.
The four figures are, flower, ball (sort of), spiral, and a lissajous pattern.
Behold, a circle : 1 1 0 2 2 0 0 0 1.57 0 0 0 5
Oila, a spiral: 1 1 0 2 2 0 0 0 1.57 0 .02 .02 60
Meanwhile, I'm quitting. I'm getting dizzy. have fun, Tom
|
319.9 | | SPRITE::OSMAN | | Thu Aug 01 1985 14:56 | 10 |
| Thanks! I tried EASYPEND and it's really nice. What you may want to consider
is one more menu item called CUSTOM, which when selected lets the user
type in their own numbers.
That way, you'll only need one version of the program.
Good work.
/Eric
|
319.10 | | PIPA::JANZEN | | Thu Aug 08 1985 12:52 | 6 |
| These programs have been incrementally improved again.
The image is centered on the screen.
A program has been added, pipa::std:[janzen.public]looppend.bas
which runs without intervention through 21 images.
easypend.bas also has the 21 images instead of 4.
Tom
|
319.11 | | SPRITE::OSMAN | | Tue Aug 13 1985 13:29 | 7 |
| I get
%COPY-E-OPENIN, error opening PIPA::STD:[JANZEN.PUBLIC]OOPPEND.BAS; as input
-RMS-E-FNF, file not found
What's the correct name ?
|
319.12 | | R2ME2::GILBERT | | Tue Aug 13 1985 15:57 | 1 |
| It's spelled LoopPend in .10, but your error message has OopPend.
|
319.13 | | PIPA::JANZEN | | Wed Aug 14 1985 18:38 | 4 |
| try reading [janzen.public]help.txt first.
I also have a spectular color one of a fixed figure if you ask nicely through
mail.
Tom
|
319.14 | | SPRITE::OSMAN | | Thu Aug 15 1985 18:16 | 10 |
|
$ mail
MAIL> SEND
To: PIPA::JANZEN
Subj: Be that color one for the vt241 ?
Message, end with Ctrl/Z
If so, could you please tell us where it is ? Thanks.
^Z
MAIL>
|
319.15 | | 6263::JANZEN | | Fri Dec 27 1985 17:03 | 7 |
| Many improved and various versions of the programs are currently
in
{cougar,tiger,pldvax,angora,morris}::userl:[janzen.public]*.bas
Please don't try to take other stuff that is not *.bas.
I think pend.dat is OK to take, and so is help.txt.
I may be moving to std disk soon on the same cluster.
Tom
|
319.16 | bouncing balls... | MUNICH::GESCHWINDNER | Was hatt'n de' Pappa da..... | Thu Mar 08 1990 08:06 | 66 |
| Maybe this reply should better go to the TERMINAL_ART conference, but
after I saw this entry here it might be nice posting this little program
here. It draws lines between two 'bouncing balls' (not what you mean)
on the screen in ReGis. You can define speed (in pixels) of the points
and the amount of lines staying on the screen before they get deleted again.
If you choose speed 1 and 2 on a vt3xx and let a 1000+ lines printed
you'll see even some interference between the drawn and deleted lines.
Have Fun
Patrik
P.S. its BASIC..... and you have to stop it by ^Y(^C)....
p.p.s. If someone is interested in.. the game could be continued with more
then 2 points....
open "tt:" for output as file #1
input "speed point 1 ";m
input "speed point 2 ";n
input "lines to rem. ";x
dim a$(x)
print #1,"[2J\Pps(e)s(m0(l0),m1(l25),m2(l50),m3(l75))"
print #1,"w(v,n0,p11111111(m2),s0,m1,a0,i(W))t(a0,d0,s1,h2,i0)w(s0)s(i(D))"
ix=1 \ kx=1 \ jy=1 \ ly=1 ! Direction setup forward
i=400 \ j=240 ! Start point 1
k=400 \ l=300 ! Start point 2
a=1
loop:
a$="p["+str$(i)+","+str$(j)+"]v(s)["+str$(k)+","+str$(l)+"](e)"
print #1,"w(i3)";a$
a$(a)=a$
b=a+1
b=b-x if b>x
print #1,"w(i0)"+a$(b)
a=a+1
a=1 if a>x
i=i+m*ix
j=j+m*jy
k=k+n*kx
l=l+n*ly
if i<0 or i>750
then ix=ix*-1
i=i+m*ix
end if
if j<0 or j>480
then jy=jy*-1
j=j+m*jy
end if
if k<0 or k>750
then kx=kx*-1
k=k+n*kx
end if
if l<0 or l>480
then ly=ly*-1
l=l+n*ly
end if
goto loop
end
|
319.17 | It should be added to TERMINAL_ART | VMSDEV::HALLYB | The Smart Money was on Goliath | Thu Mar 08 1990 12:05 | 4 |
| Cute! I used 11,7,888 and the screen appeared to be filled with TWO
growing bands of lines -- one white, the other black.
John
|
319.18 | For those who like curves more... | MUNICH::GESCHWINDNER | Was hatt'n de' Pappa da..... | Fri Mar 09 1990 06:20 | 83 |
| re: .16
For those who like curves more than straight lines.....
Patrik
open "tt:" for output as file #1
input "speed point 1 ";p1s
input "speed point 2 ";p2s
input "lines to rem. ";x
dim a$(x)
! Bring Terminal into ReGis mode and set up masks
print #1,"\[2JPps(e)s(m0(l0),m1(l25),m2(l50),m3(l75))"
print #1,"w(v,n0,p11111111(m2),s0,m1,a0,i(W))t(a0,d0,s1,h2,i0)w(s0)s(i(D))"
! Points initial location and direction setup forward
p1x=400
p1y=240
p1xd=1
p1yd=1
p2x=600
p2y=400
p2xd=1
p2yd=1
a=1
! build string to print triangle
loop:
p1xp=int(390+390*cos(p1x/780*2*pi))
p1yp=int(240+240*cos(p1y/480*2*pi))
p2xp=int(390+390*cos(p2x/780*2*pi))
p2yp=int(240+240*cos(p2y/480*2*pi))
a$="p["+str$(p1xp)+","+str$(p1yp)+"]v(s)["+str$(p2xp)+","+str$(p2yp)+"](e)"
print #1,"w(i3)";a$
a$(a)=a$ ! Remember drawn line
b=a+1
b=b-x if b>x
print #1,"w(i0)"+a$(b) ! line to be erased
a=a+1
a=1 if a>x ! next entry in line memory
! move points
p1x=p1x+p1s*p1xd \ p1y=p1y+p1s*p1yd
p2x=p2x+p2s*p2xd \ p2y=p2y+p2s*p2yd
p3x=p3x+p3s*p3xd \ p3y=p3y+p3s*p3yd
! Check for screen limits and reverse direction if neccessary
if p1x<0 or p1x>750
then p1xd=p1xd*-1
p1x=p1x+p1s*p1xd
end if
if p1y<0 or p1y>480
then p1yd=p1yd*-1
p1y=p1y+p1s*p1yd
end if
if p2x<0 or p2x>750
then p2xd=p2xd*-1
p2x=p2x+p2s*p2xd
end if
if p2y<0 or p2y>480
then p2yd=p2yd*-1
p2y=p2y+p2s*p2yd
end if
if p3x<0 or p3x>750
then p3xd=p3xd*-1
p3x=p3x+p3s*p3xd
end if
if p3y<0 or p3y>480
then p3yd=p3yd*-1
p3y=p3y+p3s*p3yd
end if
goto loop
end
|