Squares

General FreeBASIC programming questions.
Richard
Posts: 3029
Joined: Jan 15, 2007 20:44
Location: Australia

Postby Richard » Aug 01, 2011 4:43

@ Albert.
Teachers employ mechanical analogues to help children understand atomic physics, on closer inspection the analogy will be seen to be false. When mathematical skills are not available, it is only analogy that makes any prediction of atomic behaviour possible. The student can happily model what might happen in a particular situation, but they are on very thin ice as their overconfidence is based on fundamentally false reasoning.

You are imagining that the atomic scale is as mechanical as billiard balls. That is not a safe assumption when there is such a big scale difference. Understanding mechanics does not make it possible to extrapolate mechanical behaviour correctly to that of sub-atomic particles.

Imagine a black box with two input switches and a meter that always shows the sum of the two input switch positions. It is not possible to know how it works on the inside. There are many possible ways to implement the Add function. All you can say is that the output is the mathematical sum of the inputs. It always reduces fundamentally to mathematics.

Likewise, you cannot know how atoms actually interact. You can only experiment, then hypothesis and derive a set of mathematical defined rules that describe the observed system's behaviour. For that reason, Physics engines / simulations must be mathematical. They cannot employ mechanical analogues because mechanics comprises only a subset of the applied mathematics needed to model the quantum world.

Your New Age mechanical analogue models are inconsistent with the mathematically described fundamental nature of my Universe.
Richard
Posts: 3029
Joined: Jan 15, 2007 20:44
Location: Australia

Postby Richard » Aug 01, 2011 5:17

@ kiyotewolf.
Eratosthenes (circa 200BC) is credited with the reliable prime number generating “Sieve of Eratosthenes”. Also, he believed that he had measured the height of the Sun above the flat Earth. Later it was realised that he had actually measured the radius of the Earth.

CERN may have measured something but at this stage it is really only a number. I don't need to believe in dark energy or dark matter. I believe the dark things are an artefact of Physics' misunderstanding of their own fairytale. The darkness is to hide their embarrassment at getting it so wrong.
kiyotewolf
Posts: 1009
Joined: Oct 11, 2008 7:42
Location: ABQ, NM
Contact:

Postby kiyotewolf » Aug 01, 2011 7:22

Richard wrote:@ kiyotewolf.
Eratosthenes (circa 200BC) is credited with the reliable prime number generating “Sieve of Eratosthenes”. Also, he believed that he had measured the height of the Sun above the flat Earth. Later it was realised that he had actually measured the radius of the Earth.

CERN may have measured something but at this stage it is really only a number. I don't need to believe in dark energy or dark matter. I believe the dark things are an artefact of Physics' misunderstanding of their own fairytale. The darkness is to hide their embarrassment at getting it so wrong.


I think we could quantum teleport lightning in a bottle and spawn fusion now.



~Kiyote!
kiyotewolf
Posts: 1009
Joined: Oct 11, 2008 7:42
Location: ABQ, NM
Contact:

Postby kiyotewolf » Aug 01, 2011 7:40

Scientific Achievement Goes Boink!



~Kiyote!

I'm breaking a few rules of evolution, if anyone's interested, and I'm my own mad scientist.
I'm also going to hook up with locals in Champaign IL, and try to gather the comrades I need to get KikiAI a proper learning routine, so she can be exposed to all my likes and dislikes quickly, even a whole bunch of words at random, so if I(she) hears a word that sounds weird, it will have that affect on her perceptron.

I'm just amazed that the way that her brain works, it's just a bunch of particles, each with 4 bells. Two good bells, and two bad bells.
dodicat
Posts: 6650
Joined: Jan 10, 2006 20:30
Location: Scotland

Postby dodicat » Aug 01, 2011 9:09

Albert
As far as interaction between bodies, as in orbits by gravitational attraction, mathematics can only handle two, so there is no sense in using mathematics for three or more, so I hope that will be a bit of good news for you.
For a nice display of objects interacting through attraction/repulsion you must devise a visual fudge, we have already done this in the past with the spheres in 3d.
Maybe I shall repair the spheres fudge, for I only have to correct the impulses by incorporating impacts as I did in the football 2d thing.
However, just now I am working on my rainbow.
Rember that mathematics is poor when real world calculations are required, it is only useful for more or less contrived situations.
Mathematics should be renamed mappamathics, for it is essentially a mapping tool, interchanging one system into another where we apply rules which we ourselves have made, for instance vector algebra to more easily calculate simplistic position and motion.
By the way, I read in the newspaper this morning that the human brain has reached it's peak.
For us to contemplate unterstanding, for instance four dimensions, we will need massive amounts of oxygen to boost the old brainbox, and our lungs are not up to the job.
Richard
Posts: 3029
Joined: Jan 15, 2007 20:44
Location: Australia

Postby Richard » Aug 01, 2011 10:10

dodicat wrote:, as in orbits by gravitational attraction, mathematics can only handle two, so there is no sense in using mathematics for three or more,

Sorry to be the bearer of bad news Albert, but the concept of a barycentre makes possible the accurate computation of gravitational attraction in planetary systems and even in galaxies. The two masses that go in the gravity equation are the body you are interested in, the other is the barycentre of all the other masses involved. The barycentre of the solar system orbits the Sun in a complex but precisely predictable path.
http://en.wikipedia.org/wiki/Center_of_ ... _astronomy

SLALIB (Astrophysics package) wrote:Earth/Sun ephemerides can be generated using the routine sla_EVP, which predicts Earth position and velocity with respect to both the solar-system barycentre and the Sun. Maximum velocity error is 0.42 metres per second; maximum heliocentric position error is 1600 km (about 2”), with barycentric position errors about 4 times worse. (The Sun's position as seen from the Earth can, of course, be obtained simply by reversing the signs of the Cartesian components of the Earth : Sun vector.)
dafhi
Posts: 1357
Joined: Jun 04, 2005 9:51

Postby dafhi » Aug 02, 2011 2:37

@albert

I like your premise. I too have fascination with attraction / repulstion, and am inclined to believe that light travels through a type of 'liquid'

As Richard pointed out, typically our most prevalent "map" is analogy.
dodicat
Posts: 6650
Joined: Jan 10, 2006 20:30
Location: Scotland

Postby dodicat » Aug 02, 2011 10:13

Albert/Richard

Thank you for the link Richard.
Did you notice, Albert, that the animations given in the link are introduced by the words:
"Images are representative (made by hand), not simulated"
Which was my point really, you don't really have to use Kepler's laws and polar co-ordinate vector models to draw orbits.

The idea of the barycentre is yet another maths mapping of many bodies into one fictitious particle, so it boils down to the original mathematical problem of central force and mutual orbits of TWO bodies.

Is this not really a planetary workaround, as Stonehenge was?

I would regard anything which is not an analytical solution as a workaround, but that's just my opinion.

Hi Dafhi, The Wiki for analogy link opens with the same old analogy solar system ~ atom.
Pity you couldn't apply central forces to atoms, but electrons are too flighty by far, they have been playing "catch me if you can" since Physics was invented.

This is not really an analogy, I would say it is more akin to an allegory.
dodicat
Posts: 6650
Joined: Jan 10, 2006 20:30
Location: Scotland

Postby dodicat » Aug 02, 2011 21:06

Got my rainbow done, It'll blend with any background if fbgfx alpha primitives is envoked.
Gave it a test run on my binary adder but I'll more than likely give it a more scenic and serene setting.
I havn't paid much attention to the aspect of the rainbow, and just did it from memory and a quick look at some pictures on the net.

Code: Select all



#include "fbgfx.bi"
Dim Shared As Integer xres,yres
Screen 19,32,1, fb.GFX_ALPHA_PRIMITIVES
colour:
Data _
&HFFFF0000,&HFFFF0000,&HFFFF0000,&HFF000000,&HFFFF00FF,&HFFFF00FF,&HFF000000,&HFF000000,_
&HFFFF00FF,&HFFFF00FF,&HFF000000,&HFFFF00FF,&HFFFF00FF,&HFFFF00FF,&HFF000000,&HFF000000,_
&HFFFF00FF,&HFFFF00FF,&HFF000000,&HFF000000,&HFF000000,&HFF800000,&HFF800000,&HFFFF0000,_
&HFFFF0000,&HFFFF0000,&HFFFF0000,&HFF000000,&HFF000000,&HFF800000,&HFF008000,&HFFFF0000,_
&HFFFF0000,&HFFFF0000,&HFFFF0000,&HFF808080,&HFF000000,&HFF008000,&HFF008000,&HFFFF0000,_
&HFFFF0000,&HFF808080,&HFFFF0000,&HFF000000,&HFF000000,&HFF008000,&HFF008000,&HFFFF0000,_
&HFF808080,&HFF808080,&HFF000000,&HFF000000,&HFF008000,&HFFFF0080,&HFF808080,&HFF808080,_
&HFF800080,&HFF800080,&HFF800080,&HFF000000,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,_
&HFFFFFF00,&HFFFF0080,&HFF800080,&HFF008000,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,_
&HFF000000,&HFF000000,&HFFFFFF00,&HFFFFFF00,&HFF800080,&HFF008000,&HFF0080FF,&HFF0080FF,_
&HFF000000,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,&HFFFFFF00,_
&HFFFFFF00,&HFF008000,&HFF008000,&HFF0080FF,&HFF0080FF,&HFF000000,&HFFFF8040,&HFFFF8040,_
&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,&HFF000000,&HFF0080FF,&HFF0080FF,&HFF0080FF,_
&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,&HFFFF0000,_
&HFFFF0000,&HFFFF0000,&HFF000000,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,_
&HFF000000,&HFFFF0000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFFFFFF00,_
&HFF000000,&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,&HFFFF8040,&HFFFF8040,&HFFFF8040,_
&HFFFF8040,&HFF000000,&HFF000000,&HFF8080FF,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFFFF0000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,_
&HFFFFFF00,&HFF000000,&HFF000000,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,_
&HFFFF0000,&HFFFF0000,&HFFFF0000,&HFF0080FF,&HFF0080FF,&HFF0080FF,&HFFFF8040,&HFFFF8040,_
&HFFFF8040,&HFFFF8040,&HFF000000,&HFF000000,&HFF0080FF,&HFF0080FF,&HFF0080FF,&HFF808080,_
&HFF000000,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,_
&HFF000000,&HFF008000,&HFF0080FF,&HFF0080FF,&HFF0080FF,&HFF808080,&HFFFF8040,&HFFFF8040,_
&HFFFF8040,&HFFFF8040,&HFF000000,&HFFFFFF00,&HFFFFFF00,&HFFFFFF00,&HFF800080,&HFF008000,_
&HFF0080FF,&HFF0080FF,&HFF808080,&HFF000000,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,_
&HFFFF8040,&HFFFF8040,&HFF000000,&HFFFF0080,&HFFFFFF00,&HFF800080,&HFF008000,&HFF808080,_
&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,&HFFFF0080,_
&HFFFF0080,&HFF800080,&HFF008000,&HFF008000,&HFF808080,&HFF000000,&HFF000000,&HFFFF8040,_
&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,&HFF008000,&HFFFF0080,&HFFFF0000,&HFFFF0000,_
&HFFFF0000,&HFF808080,&HFF000000,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,&HFF008000,_
&HFF008000,&HFFFF0000,&HFFFF0000,&HFF800080,&HFF000000,&HFF000000,&HFF008000,&HFFFF0000,_
&HFF000000,&HFF000000,&HFF000000,&HFF800000,&HFF800000,&HFFFF0000,&HFFFF0000,&HFFFF0000,_
&HFFFF0000,&HFF000000,&HFF000000,&HFF800000,&HFFFF0000,&HFFFF0000,&HFFFF0000,&HFFFF0000,_
&HFF000000,&HFF000000,&HFFFF00FF,&HFF800000,&HFFFF0000,&HFFFF0000,&HFF000000,&HFF000000,_
&HFF000000,&HFFFF00FF,&HFFFF00FF,&HFFFF00FF,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFFFF00FF,&HFFFF00FF,&HFFFF00FF,&HFF000000,&HFFFF00FF,&HFFFF00FF,&HFFFF00FF,&HFFFF0000,_
&HFF000000,&HFFFF0000,&HFFFF0000
xpos:
Data _
49,49,50,50,50,50,51,51,51,51,52,52,52,52,52,53,53,53,53,53,_
54,54,54,54,54,54,54,54,55,55,55,55,55,55,55,55,56,56,56,56,_
56,56,56,56,57,57,57,57,57,57,57,58,58,58,58,58,58,58,58,58,_
58,58,58,59,59,59,59,59,59,59,59,59,60,60,60,60,60,60,60,60,_
60,60,60,60,60,60,61,61,61,61,61,61,61,61,61,61,61,61,61,62,_
62,62,62,62,62,62,62,62,62,62,63,63,63,63,63,63,63,63,63,63,_
64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,65,65,65,_
65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,66,66,66,_
66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,67,67,67,67,67,_
67,67,67,67,67,67,68,68,68,68,68,68,68,68,68,68,68,68,68,69,_
69,69,69,69,69,69,69,69,69,69,70,70,70,70,70,70,70,70,70,70,_
70,70,70,70,70,70,71,71,71,71,71,71,71,71,71,71,71,71,72,72,_
72,72,72,72,72,72,72,72,72,72,72,73,73,73,73,73,73,73,73,73,_
73,73,74,74,74,74,74,74,75,75,75,75,75,76,76,76,76,76,76,76,_
76,77,77,77,77,77,77,77,77,78,78,78,78,78,78,78,79,79,79,79,_
79,79,80,80,80,80,80,81,81,81,81,82,82,83,83
ypos:
Data _
49,50,49,50,56,57,49,50,55,57,49,54,55,56,57,48,54,56,58,59,_
48,54,55,56,57,58,59,60,48,54,55,56,57,58,59,60,48,54,55,56,_
57,58,59,61,48,54,55,56,59,61,63,48,54,55,56,57,58,59,61,63,_
67,68,69,48,54,55,59,62,66,67,68,69,48,54,55,56,57,60,61,62,_
64,66,67,68,69,70,48,54,55,58,59,60,61,64,65,66,68,69,70,48,_
54,60,61,62,65,66,67,68,69,70,48,54,55,56,64,65,66,67,68,69,_
48,51,52,53,54,55,56,57,58,59,60,62,63,65,66,68,69,48,49,51,_
52,53,54,55,56,57,58,59,60,62,63,64,65,66,67,68,69,48,49,51,_
52,53,54,55,56,57,58,59,60,62,63,65,66,67,68,48,54,55,56,60,_
61,62,66,67,68,69,48,54,60,61,62,63,64,65,66,67,68,69,70,48,_
54,58,60,61,62,63,66,67,69,70,48,54,55,56,57,58,60,61,63,64,_
65,66,67,68,69,70,48,54,56,57,59,62,65,66,67,68,69,70,48,54,_
55,58,59,60,62,63,64,66,67,68,70,48,54,55,57,58,59,62,63,67,_
69,70,48,54,56,57,59,61,48,54,55,58,62,48,54,55,56,57,58,59,_
60,48,54,55,56,57,58,60,61,48,54,55,56,57,59,60,48,54,55,56,_
57,58,48,49,54,55,56,49,54,55,56,49,50,49,50
'_______________________________
colour2:
Data _
&HFFFF0000,&HFFFF0000,&HFFFF0000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF008000,&HFFFF0080,&HFF000000,_
&HFFFFFF00,&HFFFF0080,&HFF000000,&HFF000000,&HFFFFFF00,&HFFFF0000,&HFF000000,&HFFFFFF00,_
&HFFFFFF00,&HFFFF0000,&HFFFF0000,&HFFFF0000,&HFF000000,&HFF000000,&HFF0080FF,&HFF0080FF,_
&HFF0080FF,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,_
&HFFFF0000,&HFFFF0000,&HFFFF0000,&HFF000000,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,_
&HFFFF8040,&HFF000000,&HFFFF0000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFFFFFF00,&HFF000000,&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,&HFFFF8040,&HFFFF8040,_
&HFFFF8040,&HFFFF8040,&HFF000000,&HFF000000,&HFF8080FF,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFFFF0000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFFFFFF00,&HFF000000,_
&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,_
&HFF000000,&HFFFF0000,&HFFFF0000,&HFFFF0000,&HFF0080FF,&HFF0080FF,&HFF0080FF,&HFFFF8040,_
&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,&HFF000000,&HFFFF0000,&HFFFF0000,&HFF000000,_
&HFF000000,&HFFFF0000,&HFFFF0000,&HFF000000,&HFFFFFF00,&HFFFFFF00,&HFFFFFF00,&HFF000000,_
&HFFFF0080,&HFFFFFF00,&HFF000000,&HFFFF0080,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFFFF0000,&HFF000000,_
&HFFFF0000,&HFFFF0000
xpos2:
Data _
49,49,50,50,51,51,52,53,54,55,56,57,58,58,58,59,59,59,60,60,_
60,60,61,61,61,61,61,61,62,62,62,62,62,62,62,62,62,62,62,63,_
63,63,63,63,63,63,63,63,63,64,64,64,64,64,64,64,64,64,64,64,_
64,64,64,64,64,64,65,65,65,65,65,65,65,65,65,65,65,65,65,65,_
65,65,65,65,65,65,66,66,66,66,66,66,66,66,66,66,66,66,66,66,_
66,66,66,66,67,67,67,67,67,67,67,67,67,67,67,68,68,68,68,69,_
69,69,69,70,70,70,70,71,71,71,72,72,73,74,75,76,77,78,79,80,_
80,81,82,82,83,83
ypos2:
Data _
49,50,49,50,49,50,49,48,48,48,48,48,48,54,55,48,54,55,48,54,_
55,56,48,54,55,57,58,59,48,54,60,61,62,65,66,67,68,69,70,48,_
54,55,56,64,65,66,67,68,69,48,51,52,53,54,55,56,57,58,59,60,_
62,63,65,66,68,69,48,49,51,52,53,54,55,56,57,58,59,60,62,63,_
64,65,66,67,68,69,48,49,51,52,53,54,55,56,57,58,59,60,62,63,_
65,66,67,68,48,54,55,56,60,61,62,66,67,68,69,48,54,59,60,48,_
54,56,58,48,54,55,56,48,54,56,48,54,48,48,48,48,48,48,48,48,_
49,49,49,50,49,50
colour3:
Data _
&HFFFF0000,&HFFFF0000,&HFFFF0000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFFFF0000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,&HFFFF8040,_
&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,&HFF000000,&HFF8080FF,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,&HFFFFFF00,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFFFF0000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFFFFFF00,&HFF000000,&HFF000000,&HFFFFFF00,&HFF000000,&HFF000000,&HFFFF8040,&HFFFF8040,_
&HFFFF8040,&HFFFF8040,&HFFFF8040,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,&HFF000000,_
&HFF000000,&HFF000000,&HFF000000,&HFFFF0000,&HFF000000,&HFFFF0000,&HFFFF0000
xpos3:
Data _
49,49,50,50,51,51,52,53,54,55,56,57,58,59,60,61,62,63,64,64,_
64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,65,65,65,65,_
65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,66,66,66,66,_
66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,67,68,69,70,71,_
72,73,74,75,76,77,78,79,80,80,81,82,82,83,83
ypos3:
Data _
49,50,49,50,49,50,49,48,48,48,48,48,48,48,48,48,48,48,48,51,_
52,53,54,55,56,57,58,59,60,62,63,65,66,67,68,69,48,49,51,52,_
53,54,55,56,57,58,59,60,62,63,64,65,66,67,68,69,48,49,51,52,_
53,54,55,56,57,58,59,60,62,63,65,66,67,68,69,48,48,48,48,48,_
48,48,48,48,48,48,48,48,48,49,49,49,50,49,50

Screeninfo xres,yres
Dim Shared As Any Pointer im
im=imagecreate(xres,yres)
Type bow
    As Integer min,max,z
    As Single br,bg,bb,ba
    as single xp,yp
End Type
Dim shared As bow r1
#define Red(c) (CUInt(c) Shr 16 And 255 )
#define green(c) (CUInt(c) Shr  8 And 255 )
#define blue(c) (CUInt(c)  And 255 )
#define alpha(c) (CUInt(c) Shr 24         )
#define distance(cx,cy,px,py) sqr( (cx-px)*(cx-px)+(cy-py)*(cy-py))
Function rainbow(p As bow,part as string="outer") As Uinteger
    Dim As Uinteger r,g,b,col
    Dim As Double gap=(p.max-p.min)/6
    if part="outer" then
       
    If p.z>=p.min-2*gap And p.z<p.min Then
        col=point(p.xp,p.yp,im)
            p.br=red(col)
            p.bg=green(col)
            p.bb=blue(col)
        r=(255-p.br)*(p.z-p.min+2*gap)/(2*gap)+p.br
        g=-p.bg*(p.z-p.min+2*gap)/(2*gap)+p.bg
        b=-p.bb*(p.z-p.min+2*gap)/(2*gap)+p.bb
        Return Rgba(r,g,b,p.ba)
    End If
    If p.z>=p.min And p.z<p.min+gap Then  'red to orange
        r=255                '  r none
        g=165*(p.z-p.min)/(gap)'0  0 g 165
        b=0                  'b none
        Return Rgba(r,g,b,p.ba)
    End If
   
    If p.z>=p.min+gap And p.z<p.min+2*gap Then 'orange to yellow
        r=255                  'r none
        g=90*(p.z-p.min-gap)/gap+165'165  165 g 255
        b=0                    'b none
        Return Rgba(r,g,b,p.ba)
    End If
    If p.z>=p.min+2*gap And p.z<p.min+3*gap Then 'yellow to green
        r=-255*(p.z-p.min-2*gap)/gap+255'255  255 r 0
        g=-127*(p.z-p.min-2*gap)/gap+255'255  255 g 128
        b=0
        Return Rgba(r,g,b,p.ba)
    End If
    If p.z>=p.min+3*gap And p.z<p.min+4*gap Then 'green to blue
        r=0                           'r none
        g=-128*(p.z-p.min-3*gap)/gap +128'128         '128 g 0
        b=255*(p.z-p.min-3*gap)/gap'0                '0 b 255
        Return Rgba(r,g,b,p.ba)
    End If
   
    If p.z>=p.min+4*gap And p.z<p.min+5*gap Then'blue to indigo
        r=75*(p.z-p.min-4*gap)/gap'0                         '0 r 75
        g=0                                                  '0 g 0
        b=-125*(p.z-p.min-4*gap)/gap+255'255                        '255 b 130
        Return Rgba(r,g,b,p.ba)
    End If
   
    If p.z>=p.min+5*gap And p.z<p.min+6*gap Then'indigo to violet
        r=163*(p.z-p.min-5*gap)/gap+75'75                        ' 75 r 238
        g=130*(p.z-p.min-5*gap)/gap'0                         '0 g 130
        b=108*(p.z-p.min-5*gap)/gap+130'130                        '130 b 238
        Return Rgba(r,g,b,p.ba)
    End If
   
    If p.z>=p.min+6*gap And p.z<p.min+8*gap Then
        col=point(p.xp,p.yp,im)
            p.br=red(col)
            p.bg=green(col)
            p.bb=blue(col)
        r=(p.br-238)*(p.z-p.min-6*gap)/(2*gap)+238
        g=(p.bg-130)*(p.z-p.min-6*gap)/(2*gap)+130
        b=(p.bb-238)*(p.z-p.min-6*gap)/(2*gap)+238
        Return Rgba(r,g,b,p.ba)
    End If
   
    end if
  '____________________________________________________ 
   
    if part="inner" then
       
    If p.z>=p.min-2*gap And p.z<p.min Then
        col=point(p.xp,p.yp,im)
            p.br=red(col)
            p.bg=green(col)
            p.bb=blue(col)
            r=(238-p.br)*(p.z-p.min+2*gap)/(2*gap)+p.br
            g=(130-p.bg)*(p.z-p.min+2*gap)/(2*gap)+p.bg
            b=(238-p.bb)*(p.z-p.min+2*gap)/(2*gap)+p.bb'238
       
        Return Rgba(r,g,b,p.ba)
    End If
    If p.z>=p.min And p.z<p.min+gap Then  'violet to indigo
        r=(75-238)*(p.z-p.min)/gap+238                ' 238 r 75
        g=-130*(p.z-p.min)/(gap)+130                  '0  130 g 0
        b=(130-238)*(p.z-p.min)/gap+238                  '238 b 130
        Return Rgba(r,g,b,p.ba)
    End If
   
    If p.z>=p.min+gap And p.z<p.min+2*gap Then 'indigo to blue'''
        r=(0-75)*(p.z-p.min-gap)/gap+75                       '75 r 0
        g=0'90*(p.z-p.min-gap)/gap+165'165  0 g 0
        b=  (255-130)*(p.z-p.min-gap)/gap+130                       '130 b 255
        Return Rgba(r,g,b,p.ba)
    End If
    If p.z>=p.min+2*gap And p.z<p.min+3*gap Then 'blue to green
        r=0                                         '  0 r 0
        g=128*(p.z-p.min-2*gap)/gap '                  0 g 128
        b=-255*(p.z-p.min-2*gap)/gap+255               '255 b 0
        Return Rgba(r,g,b,p.ba)
    End If
    If p.z>=p.min+3*gap And p.z<p.min+4*gap Then 'green to yellow
        r=255*(p.z-p.min-3*gap)/gap                    '0 r  255
        g=(255-128)*(p.z-p.min-3*gap)/gap +128         '128 g 255
        b=0                                            '0 b 0
        Return Rgba(r,g,b,p.ba)
    End If
   
    If p.z>=p.min+4*gap And p.z<p.min+5*gap Then'yellow to orange
        r=255                                              '255 r 255
        g=(165-255)* (p.z-p.min-4*gap)/gap  +255            '255 g 165                                  '255 g 165
        b=0                                                 '0 b 0
        Return Rgba(r,g,b,p.ba)
    End If
   
    If p.z>=p.min+5*gap And p.z<p.min+6*gap Then'orange to red
        r=255                                                   ' 255 r 255
        g=  -165* (p.z-p.min-5*gap)/gap +165                    '165 g 0
        b=0                                                     '0 b 0
        Return Rgba(r,g,b,p.ba)
    End If
   
    If p.z>=p.min+6*gap And p.z<p.min+8*gap Then
        col=point(p.xp,p.yp,im)
            p.br=red(col)
            p.bg=green(col)
            p.bb=blue(col)
            r=(p.br-255)*(p.z-p.min-6*gap)/(2*gap)+255'p.br
            g=p.bg*(p.z-p.min-6*gap)/(2*gap)'+p.bg
        b=p.bb*(p.z-p.min-6*gap)/(2*gap)'+p.bb
       
        Return Rgba(r,g,b,p.ba)
    End If
   
    end if
End Function
Type d2
    As Single mx,my
    Dim As Single mw,ang
End Type
Operator + (v1 As d2,v2 As d2) As d2
Return Type<d2>(v1.mx+v2.mx,v1.my+v2.my,v1.mw+v2.mw,v1.ang+v2.ang)
End Operator
#define rr(f,l) (Rnd*(l-f)+f)
Dim Shared As Uinteger array(xres,yres)
Dim Shared tails(0 To 8) As d2
Sub thickline(x1 As Double,_
    y1 As Double,_
    x2 As Double,_
    y2 As Double,_
    thickness As Double,_
    colour As Uinteger,_
    im As Any Pointer=0)
    Dim p As Uinteger=Rgb(255, 255, 254)
    If thickness<=2 Then
        Line im,(x1,y1)-(x2,y2),colour
    Else               
        Dim As Double h=Sqr((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)):If h=0 Then h=1e-6
        Dim As Double s= (y1-y2)/h ,c=(x2-x1)/h
        For x As Integer=1 To 2
            Line im,(x1+s*thickness/2,y1+c*thickness/2)-(x2+s*thickness/2,y2+c*thickness/2),p
            Line im,(x1-s*thickness/2,y1-c*thickness/2)-(x2-s*thickness/2,y2-c*thickness/2),p
            Line im,(x1+s*thickness/2,y1+c*thickness/2)-(x1-s*thickness/2,y1-c*thickness/2),p
            Line im,(x2+s*thickness/2,y2+c*thickness/2)-(x2-s*thickness/2,y2-c*thickness/2),p
            Paint im,((x1+x2)/2, (y1+y2)/2), p, p
            p=colour
        Next x
    End If
End Sub
Sub drawline(p1 As d2,p2 As d2,col As Uinteger,th As Single=1,im As Any Pointer=0)
    If th<=2 Then
        Line im,(p1.mx,p1.my)-(p2.mx,p2.my),col
    Else
        thickline(p1.mx,p1.my,p2.mx,p2.my,th,col,im)
    End If
End Sub
Sub cloud(x As Integer, y As Integer,length As Integer=100,_alpha As Integer=105, Zoom As Single = 0)
    Dim As Integer r=255
    Dim As Integer b=255
    Dim As Integer g=255
    Dim As Double pi=3.14159
    If Length<=1 Or _alpha<=1 Then Exit Sub
    Dim As Single rnded = -pi+Rnd*1*pi/2
    Dim As Single rnded2 = -pi+Rnd*-3*pi
    If _alpha<25 Then
        For i As Integer = 0 To 255-_alpha Step 100
            Line im,(-(Zoom/2)+x-length/2,y)-((Zoom/2)+x+Length/6+length*Cos(-pi/2+rnded*PI/3),y+Length/6+length*Sin(-pi/2+rnded*PI/3)),Rgba(R,G,B,_alpha)
            Line im,(-(Zoom/2)+x-length/2,y)-((Zoom/2)+x+Length/6+length*Cos(-pi/2+rnded2*PI/3),y+Length/6+length*Sin(pi/2+rnded2*PI/3)),Rgba(R,G,B,_alpha)
        Next
    End If
    cloud(-(Zoom/2)+x+length*Cos(-pi/2+rnded*PI/3),(Zoom/2)+y+length*Sin(-pi/2+rnded*PI/3),length/1.4,_alpha/1.2,Zoom)
    cloud(-(Zoom/2)+x+length*Cos(-pi/2+rnded2*PI/3),(Zoom/2)+y+length*Sin(pi/2+rnded2*PI/3),length/1.4,_alpha/1.2,Zoom)
    cloud(-(Zoom/2)+x+length*Cos(pi/3+rnded2*PI/3),(Zoom/2)+y+length*Sin(pi+rnded2*PI/3),length/1.4,_alpha/2,Zoom)
End Sub

#macro rotate2(pivot,p,a,d)
Type<d2>(d*(Cos(a*.0174533)*(p.mx-pivot.mx)-Sin(a*.0174533)*(p.my-pivot.my)) +pivot.mx,_
d*(Sin(a*.0174533)*(p.mx-pivot.mx)+Cos(a*.0174533)*(p.my-pivot.my)) +pivot.my)
#endmacro
#macro turnline(piv,p1,p2,ang,col,th,d)
Scope
    var rot1=rotate2(piv,p1,ang,d)
    var rot2=rotate2(piv,p2,ang,d)
    drawline(rot1,rot2,col,th,im)
End Scope
#endmacro
#macro _incircle(cx,cy,radius,x,y)
(cx-x)*(cx-x) +(cy-y)*(cy-y)<= radius*radius
#endmacro
Sub scan
    Draw String(360,100),"Please wait"
    Dim As Integer xres,yres
    Screeninfo xres,yres
    For x As Integer=.31*xres To .69*xres
        For y As Integer=.5*yres To 9*yres
            Pset(x,y),Rgb(10,Rnd*255,0)
        Next y
    Next x
    Dim num As String
    For z As Integer=0 To 90 Step 12
        num=Str(Bin(Int(rr(20,50))))
        Draw String(360,400+z),num,Rgb(100,10,0)
    Next z
    For x As Integer=0 to xres
        For y As Integer=0 to yres
            array(x,y)=Point(x,y)
        Next y
    Next x
End Sub
Sub draw_tails(b As d2)
    #macro rotate(pivotx,pivoty,px,py,a,scale)
    var Newx=scale*(Cos(a*.0174533)*(px-pivotx)-Sin(a*.0174533)*(py-pivoty))+pivotx
    var Newy=scale*(Sin(a*.0174533)*(px-pivotx)+Cos(a*.0174533)*(py-pivoty))+pivoty
    #endmacro
    #macro incircle(cx,cy,radius,x,y)
    (cx-x)*(cx-x) +(cy-y)*(cy-y)<= radius*radius
    #endmacro
    If b.mw=0 Then b.mw=1
    b.mw=Abs(b.mw)
    Dim As Single dil
    For x As Integer=b.mx-40 To b.mx+40
        For y As Integer=b.my-40 To b.my+40
            If incircle(b.mx,b.my,40,x,y) Then '40
                rotate(b.mx,b.my,x,y,b.ang,dil)
                var dist=Sqr((b.mx-newx)*(b.mx-newx)+(b.my-newy)*(b.my-newy))
                dil=(b.mw+(.5-b.mw)*dist/(40*b.mw))
                If incircle(b.mx,b.my,(4*b.mw),newx,newy) Then'20
                    Line(NewX-dil/2,NewY-dil/2)-(NewX+dil/2,NewY+dil/2),array(Abs(x),Abs(y)),BF
                End If
            End If
        Next y
    Next x
End Sub
Sub settails
    For z As Integer=0 To 5
        tails(z)=Type<d2>(400+15*z,280-15*z,5-1*z,180)
    Next z
    tails(6).mw=1:tails(7).mw=1:tails(8).mw=1
End Sub
#macro arraydelete(a,position)
Scope
    Dim As Integer index=position
    If index>=Lbound(a) And index<=Ubound(a) Then
        For x As Integer=index To Ubound(a)-1
            a(x)=a(x+1)
        Next x
        Redim Preserve a(Lbound(a) To Ubound(a)-1)
        Endif
    End Scope
    #endmacro
   
    Sub draw_background
        For y As Integer=0 To yres
            Line im,(0,y)-(xres,y),Rgb((153-28)*y/(.7*yres)+28,00,200)
        Next y
        cloud(350,50,70,40,5)
        cloud(700,100,50,Rnd*30,5)
        cloud(150,150,100,50,5)
        Dim As Double x,y,k1,k2
        k1=.01
        k2=30
        Dim As Double lasty
        For x=0 To xres
            y=k2*(Sin(2*x*k1)+Cos(x*k1))+200
            Dim As Double gr=100-40*(lasty-y)
            Line im,(x,yres)-(x,y),Rgb(0,gr,0)
            lasty=y
        Next x
        Dim As d2 v1,v2
        Dim As Uinteger treecol
        Dim As Double pivx,pivy,pivz,l,da,dif,k,g0
        Dim As d2 piv
        Dim shader As Integer =50
        Dim As Uinteger r,g,b
        For m As Double=0 To 50 Step 10
            Randomize m
            For n As Double=525-(m+rr(2,20)) To 990+m Step rr(3,9)
                Randomize n^2
                l=rr(2,11)
                k=rr(1,5)
                piv.mx=n
                piv.my= k2*(Sin(2*n*k1)+Cos(n*k1))+200+k+m
                piv.mw=0
                g0=-40*k2*(2*k1*Cos(2*k1*n)-k1*Sin(k1*n))
                Line im,(piv.mx,piv.my)-(piv.mx+rr(-2,2),piv.my+8),Rgb(144-g0,35-g0,37)
                Dim cc As Double=rr(1,40)
                For a As Double=90 To 450 Step 7
                    Randomize a
                    shader=-rr(2,4)
                    r=20+shader+cc
                    g=130-g0+shader:If g>40 Then g=g-40
                    b=20+shader:If b>20 Then b=b-20
                    treecol=Rgb(r,g,b)
                    For a2 As Double=0 To l Step .3
                        If a>270 Then shader=-shader
                        treecol=Rgb(r,g-a2*shader,b)
                        v1=Type<d2>(piv.mx-a2,piv.my,piv.mw)
                        v2=Type<d2>(piv.mx-l,piv.my,piv.mw)
                        turnline(piv,v1,v2,a,treecol,1,1)
                    Next a2
                Next a
            Next n
        Next m
        For m As Double=0 To 220 Step 10
            Randomize m
            For n As Double=70-(m+rr(2,50)) To 585+m Step rr(3,9)
                Randomize n^2
                l=rr(3,13)
                k=rr(1,5)
                piv.mx=n
                piv.my=k2*(Sin(2*n*k1)+Cos(n*k1))+200+k+m
                piv.mw=0
                g0=-30*k2*(2*k1*Cos(2*k1*n)-k1*Sin(k1*n))
                Line im, (piv.mx,piv.my)-(piv.mx+rr(-2,2),piv.my+12),Rgb(144-g0,35-g0,37)
                Dim cc As Double=rr(0,15)
                For a As Double=135 To 405 Step 5
                    Randomize a
                    shader=rr(2,4)
                    r=20+shader+cc
                    g=90-g0+shader
                    b=20+shader:If b>20 Then b=b-20
                    treecol=Rgb(r,g,b)
                    For a2 As Double=0 To l Step .3
                        If a>270 Then shader=-shader
                        treecol=Rgb(r,g-a2*shader,b)
                        v1=Type<d2>(piv.mx+a2,piv.my,piv.mw)
                        v2=Type<d2>(piv.mx-l,piv.my,piv.mw)
                        turnline(piv,v1,v2,a,treecol,1,1)     
                    Next a2
                Next a
            Next n
        Next m
        '_____________________
        Dim As Double cx=400,cy=600
For x As Integer=0 To 800
    For y As Integer=0 To 600
        r1.xp=x:r1.yp=y
         'r1.z=y
        ' r1.min=00
         'r1.max=600
         'r1.ba=255
        'Pset im,(x,y),rainbow(r1)
        r1.z=distance(cx,cy,x,y)
        r1.min=400
         r1.max=450
         r1.ba=55
        Pset im,(x,y),rainbow(r1,"outer")
        r1.min=300
        r1.max=330
        r1.ba=100
        Pset im,(x,y),rainbow(r1,"inner")
       
    Next y
Next x

       
        For x As Integer=0 To xres
            For y As Integer=0 To yres
                If _incircle(350,500,40,x,y) Or _incircle(450,500,40,x,y) Then
                    Pset im,(x,y),Rgb(Rnd*255,Rnd*255,Rnd*25)
                End If
            Next y
        Next x
        Draw String im,(420,510),"1001101",Rgb(0,0,0)
        Draw String im,(320,510),"1101001",Rgb(0,0,0)
        Circle im,(350,500),15,Rgb(250,250,255),,,,f
        Circle im,(450,500),15,Rgb(250,250,255),,,,f
       
        Circle im,(350,500),15,Rgb(00,00,55)',,,,f
        Circle im,(450,500),15,Rgb(00,00,55)',,,,f
       
        Circle im,(350,500),8,Rgba(0,0,255,150),,,,f
        Circle im,(450,500),8,Rgba(0,0,255,150),,,,f
       
        Circle im,(350,500),4,Rgb(0,0,0),,,.3,f
        Circle im,(450,500),4,Rgb(0,0,0),,,.3,f
    End Sub
    Sub draw_balls(b As d2)
        Dim  As Uinteger colour(90,90)
        #macro rotate(pivotx,pivoty,px,py,a,scale)
        var Newx=scale*(Cos(a*.0174533)*(px-pivotx)-Sin(a*.0174533)*(py-pivoty))+pivotx
        var Newy=scale*(Sin(a*.0174533)*(px-pivotx)+Cos(a*.0174533)*(py-pivoty))+pivoty
        #endmacro
        #macro incircle(cx,cy,radius,x,y)
        (cx-x)*(cx-x) +(cy-y)*(cy-y)<= radius*radius
        #endmacro
        If b.mw=0 Then b.mw=1
        b.mw=Abs(b.mw)
        For x As Integer=b.mx-40 To b.mx+40
            For y As Integer=b.my-40 To b.my+40
                If incircle(b.mx,b.my,40,x,y) Then
                    colour(x-b.mx+40,y-b.my+40)=.999999*Point(x,y)
                End If
            Next y
        Next x
       
        Dim As Single dil
        For x As Integer=b.mx-40 To b.mx+40
            For y As Integer=b.my-40 To b.my+40
                If incircle(b.mx,b.my,40,x,y) Then
                    rotate(b.mx,b.my,x,y,b.ang,dil)
                    var dist=Sqr((b.mx-newx)*(b.mx-newx)+(b.my-newy)*(b.my-newy))
                    dil=(b.mw+(.5-b.mw)*dist/(40*b.mw))
                    If incircle(b.mx,b.my,(20*b.mw),newx,newy) Then
                        Line(NewX-dil/2,NewY-dil/2)-(NewX+dil/2,NewY+dil/2),colour(x-b.mx+40,y-b.my+40),BF
                    End If
                End If
            Next y
        Next x
        'circle(b.mx,b.my),20*b.mw
    End Sub
    Sub framecounter
        Static As Single frame,fps
        frame=frame+1
        Static As Single t1,t2
        If frame>=fps Then
            t1 = Timer
            fps = frame/(t1-t2)
            Windowtitle "Frames per second = " & fps
            t2=Timer
            frame=0
        End If
    End Sub
    Dim As Integer _x,_y,_z,flag
    Dim As Single l,dx,dy,sx,sy
    #macro add()
    flag=1
    num=num+1
    Redim Preserve ball(num)
    #endmacro
    #macro tung()
    _x=bf.mx
    _y=bf.my
    _z=rr(2,2.5)
    ball(num)=Type<d2>(_x,_y,_z)
    dx=_x-xres/2'-_x
    dy=_y-(yres/1.9+220)'-_y
    sx=xres/2:sy=yres/1.9+220
    l=l+.1
    For z As Integer=1 To 5
        thickline(sx,sy,(xres/2+l*dx),(yres/1.9+220+l*dy),15*l,Rgb(200*l-z/2,0,0))'10*l
    Next z
    sx=xres/2+l*dx:sy=yres/1.9+220+l*dy
    'next l
    sx=xres/2:sy=yres/1.9+220
    If l>=1 Then
        l=0:flag=0
        bf.mx=rr(200,500):bf.my=rr(50,100)
    End If
    #endmacro
    Dim Shared num As Integer
    num=1
   
    reDim As d2 ball(num)
   
    Dim As Single x0=350,y0=500,x1=450,y1=500
    ball(0)=Type<d2>(x0,y0,2,0)
    ball(1)=Type<d2>(x1,y1,2,0)
    '#macro hold()
    '______________________________________________
    Type pixel_data
        As Integer Xpos,Ypos
        As Uinteger colour
    End Type
   
    '___THESE VALUES ARE FIXED_____
    Redim Shared As pixel_data a(315)
    Dim Shared As Integer count
    Dim As Double magnification
    magnification=  1.5
    Dim Shared As Integer _width,_height
    _width=  56
    _height=  36
    '____________________
   
    #macro read_data(col,xp,yp)
    Restore col
    For z As Integer=1 To Ubound(a)
        Read a(z).colour
    Next z
    Restore xp
    For z As Integer=1 To Ubound(a)
        Read a(z).xpos
    Next z
    Restore yp
    For z As Integer=1 To Ubound(a)
        Read a(z).ypos
    Next z
    #endmacro
   
    'CREATE IMAGE HERE
    Dim Shared As Any Pointer image(3)
    image(1)=imagecreate(_width,_height)
    image(2)=imagecreate(_width,_height)
    image(3)=imagecreate(_width,_height)
    Sub drawbitmap_to_image(scale As Single=1,n As Integer)
        Dim As Integer max_x=-1e6,min_x=1e6,max_y=-1e6,min_y=1e6
        Dim As Single rotx,roty
        #macro magnify(pivotx,pivoty,px,py,scale)
        rotx=scale*(px-pivotx)+pivotx
        roty=scale*(py-pivoty)+pivoty
        #endmacro
        For z As Integer=1 To Ubound(a)
            magnify(0,0,(a(z).xpos),(a(z).ypos),scale)
            If max_x<rotx Then max_x=rotx
            If min_x>rotx Then min_x=rotx
            If max_y<roty Then max_y=roty
            If min_y>roty Then min_y=roty
        Next z
        For z As Integer=1 To Ubound(a)
            magnify(0,0,(a(z).xpos),(a(z).ypos),scale)
            rotx=rotx-min_x:roty=roty-min_y
            Line image(n),(rotx-scale/2,roty-scale/2)-(rotx+scale/2,roty+scale/2),a(z).colour,BF
        Next z
    End Sub
   
    '________READ AND MAKE AN IMAGE__________
    read_data(colour,xpos,ypos)  'colour:,xpos:,ypos: are the DATA restore labels
    drawbitmap_to_image(magnification,1) 'magnification has been calculated, 1 is for image(1)
    Redim  a(146)
    read_data(colour2,xpos2,ypos2) 
    drawbitmap_to_image(magnification,2)
    Redim a(95)
    read_data(colour3,xpos3,ypos3)
    drawbitmap_to_image(magnification,3)
    'BITMAP image is now in image(1,2,3)
    #macro tailslug(r,a)
    tx=r*Cos(a)
    ty=r*Sin(a)
    #endmacro
    #macro dot(rad,slug)
    xdot=xres/2+2*rad*Cos(slug)
    ydot=yres/10+rad*Sin(slug)
    #endmacro
    #macro grass()
    For z As Integer=1 To 4000
        gl=(.1-.01)*(gr(z).my-.9*yres)/(yres+50-.9*yres)+.01
        Line (gr(z).mx,gr(z).my)-(gr(z).mx+gl*(xdot-gr(z).mx),gr(z).my+gl*(ydot-gr(z).my)),Rgb(100,gr(z).mw,0)
        If z Mod 100 =0 Then
            fr=(6-2)*(gr(z).my-.9*yres)/(yres+50-.9*yres)+2
            Circle (gr(z).mx+gl*(xdot-gr(z).mx),gr(z).my+gl*(ydot-gr(z).my)+1.1*fr),fr-2,Rgb(250,250,0),,,,f
            Circle (gr(z).mx+gl*(xdot-gr(z).mx),gr(z).my+gl*(ydot-gr(z).my)),fr,Rgb(200,0,rr(50,200)),,,,f
        End If
    Next z
    #endmacro
    Dim As String i
    Dim As Integer mx,my
    Dim As Integer xdot,ydot
    scan
    settails
    Dim Shared As d2 gr(1 To 4000)
    For z As Integer=1 To 4000
        gr(z).mx=rr(-100,(xres+100))
        gr(z).my=rr(.9*yres,(yres+50))
        gr(z).mw=rr(50,250)
    Next z
   
    draw_background
    Dim _count As Single
    Dim mm As Integer
    Dim n As Integer
    Dim As Double tslug,ty,tx,dslug,gl,fr,xdist,ydist,pi2=8*Atn(1)
    Dim As Integer bx=1,by=1,imcount,pp
    Dim As Single _dx=rr(1,2),_dy=rr(1,2)
    Dim As d2 BF,c
    bf=Type<d2>(rr(200,500),rr(50,100))
    Do
        screensync
        tslug=tslug+.05:If tslug>pi2 Then tslug=0
        dslug=dslug+.01:If dslug>pi2 Then dslug=0
        imcount=imcount+1
        If imcount>3 Then imcount=0
        n=-1
        framecounter
        _count=_count+1:If _count>1e6 Then _count=0
        mm=Int(rr(50,60))
        Screenlock
        Cls
        Put(0,0),im,Pset
        dot(200,dslug)
        grass()
        If _count Mod mm=0 Then :add():End If
        For z As Integer=0 To 8
            tailslug(z*10,1*tslug+z)
            tails(z).mx=xres/2+tx/2
            tails(z).my=480-15*z
            If z<8 Then
                thickline(tails(z).mx,tails(z).my,tails(z+1).mx,tails(z+1).my,12-z,Rgb(50,30*z,0))
            End If
            draw_tails(tails(z))
        Next z
        _dx=rr(1,5)
        _dy=rr(1,5)
        If _count Mod Int(rr(80,100))=0 Then bx=-bx
        If _count Mod Int(rr(90,100))=0 Then by=-by
        If bf.mx<0 Then bx=-bx:_dx=5
        If bf.mx>xres-56 Then bx=-bx:_dx=5
        If bf.my>yres-100 Then: add():end if
        If bf.my<0 Then by=-by:_dy=5
       
        bf=Type<d2>(bf.mx+bx*_dx,bf.my+by*_dy)
        Select Case imcount
        Case 1
            Put(bf.mx,bf.my),image(1),trans
        Case 2
            Put(bf.mx,bf.my),image(2),trans
        Case 3
            Put(bf.mx,bf.my),image(3),trans
        End Select
        pp=rr(5,10)
        thickline(400,500,400,550+pp,20,Rgb(100,rr(10,15),0))
        For z As Integer=1 To 2
            Circle(385+10*z,538+pp),9,Rgb(155,155,0),,,7,f
        Next z
        Circle(400,550+pp),20,Rgb(0,50,0),,,.2,f
        Do
            n=n+1
            If n>1 Then
                ball(n).my=ball(n).my+1
            End If
            If ball(n).my>yres Then
                arraydelete(ball,n)
                n=n-1
            End If
            xdist=-10*bf.mx/xres+5
            ydist=-10*bf.my/yres+10
            x0=350+2*xdist:x1=450+2*xdist
            y0=500+2*ydist:y1=500+2*ydist
            ball(0)=Type<d2>(x0,y0,2.5,0)
            ball(1)=Type<d2>(x1,y1,2.5,0)
            draw_balls(ball(n))
            If flag=1 Then
                tung()
            End If
        Loop Until n>=Ubound(ball)
        num=Ubound(ball)
        Screenunlock
        Sleep 1,1
    Loop Until Inkey=Chr(27)
    imagedestroy im
    For z As Integer=1 To 3:imagedestroy image(z):Next z
 
albert
Posts: 5889
Joined: Sep 28, 2006 2:41
Location: California, USA

Postby albert » Aug 03, 2011 2:13

@Richard
@Dodicat

Harvard nuclear modeling lab teaches, that protons and neutrons are physical particles and all the atom orbitals are frequencies created by these neucleons..

So what are particles made of??

We have to assume that in the beginning; only space-time existed, and therefore particles are made up of space-time..

(so if space-time of a cubic volume were to be compressed it would appear as a solid mass.)
But how would it attract/repel a like/opposite???

The big-bang theory doesn't get into how the super star that exploded came into being...

And exploding stellar particles, how would they form into a spiral galaxy, unless something was moving inward at the outward velocity and created the whirlpools...
albert
Posts: 5889
Joined: Sep 28, 2006 2:41
Location: California, USA

Postby albert » Aug 03, 2011 2:32

I've developed the theory that space-time is a sparse physical substance and has elesticity.

That would mean that all particles masses must rotate to keep the space-time wound-up , but perhaps after a mass has reached a point it might be able to retain its mass by its self..

In order for a mass to be spherical it would have to rotate on several axi's , this means perodic polar shifts. (only the earth does polar shifts)

maybe the cores of the planets and moons are doing multi axial rotations and the crust just wobbles from it,because the liquid mantles...
==============================================

How would you make the screen an elastic, sparse substance to draw it in by such a multi-axial rotation????

Would you make it tiny spheres all connected together???
kiyotewolf
Posts: 1009
Joined: Oct 11, 2008 7:42
Location: ABQ, NM
Contact:

Postby kiyotewolf » Aug 03, 2011 5:40

There is a magnetic coiled spring, in the Z axes of the universe, connecting the sun and the earth. It's about to unwind and release a whole bunch of energy, and possibly pierce our magnetic shield field, and violently strike the earth with electro-magnetic-electro-motive forces unseen in a whole eon.

I think we need to start dumping lead-acid batteries in Yellow Stone National Park to create an EMF shield, and, to start making mass quantities of dry ice so that we can give people 'personal cloud boxes' they can blow in to release a miniature cloud.

There are a bunch of forces always at work, and I really think that we're deep sea dwellers, and that at the forefront of the expansion of the universe, is not the sea, but air, and then by air, you find land, and then, God's beach house.



~Kiyote!
dafhi
Posts: 1357
Joined: Jun 04, 2005 9:51

Postby dafhi » Aug 03, 2011 9:13

u pple are nutty.

@dodicat
cool proggy

(can you believe I've edited this twice)
Richard
Posts: 3029
Joined: Jan 15, 2007 20:44
Location: Australia

Postby Richard » Aug 03, 2011 10:57

dafhi wrote:u pple are nutty.


(can you believe I've edited this twice)
Yes and Yes.
This topic is for squares, square people that is. You have to be nutty to post here, so congratulations dafhi on your coming out and welcome to the squares asylum.
albert
Posts: 5889
Joined: Sep 28, 2006 2:41
Location: California, USA

Postby albert » Aug 03, 2011 20:46

@Richard

If mass (particles) are comprised of space-time:

Then particle properties (electric charge) must then be one of the two:

1.) property is inherent in the matter, (then size of mass would determine electrical property or charge)

2.) Property is a mechanical operation..(the mass hast to act in some way to have a charge)
===============================================

I keep going around in circles, every time i solve one aspect of matter, it seems two or more impossibilties surface..
(such as the perpetual motion X/Y photon particle machine above..)

Return to “General”

Who is online

Users browsing this forum: No registered users and 8 guests