Squares

General FreeBASIC programming questions.
Locked
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

@Dodicat

This explanation might help??

When the drop hits the water, it causes a primary wave to rise up.
That primary wave then collapses and sends out a secondary wave.
That primary also collapses into the void left by the drop and causes a second primary to pop up.
That second primary collapses and sends out another secondary wave.
As the second primary collapses, it falls down under the pressure of gravity and goes below the surface causing another void..
The water collapses into that void and causes another primary to pop up. which sends out another secondary..

The initial impact spot , keeps rising and falling until the its equalized..sending out progressive secondaries..

So when you drop the pebble into the water , you don't get a single ripple traveling out.
The center of the collision keeps collapsing and rising until it's equalized. ( getting a little smaller each time. )

So you get several ripples traveling out..It makes the appearance of several rings within rings , growing out form the center...


Every time the water collapses into the void it creates another primary..
That primary collapses like another drop of water and causes another void. which spawns another primary..
Eventually the void gets to such a small value it no longer creates primaries..

But every primary that collapses , creates a secondary.. So you get rings and rings of waves traveling out from the collision...
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Drop hits water , creates a void behind it.
water collapsing into the void causes a cone to rise up

cone collapses and goes below the surface causing creating another void
water collapsing into the void causes a cone to rise up

cone collapses and goes below the surface causing creating another void
water collapsing into the void causes a cone to rise up

cone collapses and goes below the surface causing creating another void
water collapsing into the void causes a cone to rise up
etc...

So:
When you drop a pebble into the water , it causes the impact spot to keep rising and falling , making progressively smaller and smaller cones rise up..
So you don't just get , a single ( ripple ) wave.
You get a series of smaller and smaller (ripples) waves...

The water will keep iterating for several seconds..

Same thing for the wine glass: Tap it , and it will vibrate for several seconds.


"Primary" or "Incidental" waves. Have the characteristics of cones , tubes and splatters. ( primaries are caused by collisions. )
"Secondary" or "Post Incidental" waves. Have the characteristic of mounds , trough peak trough.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

@Richard

You were wrong!!

A torque or moment ( foot pounds ) or ( inch grams ) can be converted to Joules and visa versa.

https://www.google.com/search?client=ub ... 8&oe=utf-8

A foot pound is the energy it requires to raise 1 pound , 1 foot , in one second..
A Horsepower is the energy it requires to raise a horses weight ( 750 lbs ) 1 foot in one second..

Both are in Joules , 1 foot pound = 1.356 Joules.

That's what i was saying,
For all you guys's schooling and formula knowledge , you all seem a little thick..

Anything that has a mass and a period , can be expressed in Energy ( Joules )
badidea
Posts: 2586
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Squares

Post by badidea »

No, stop using these ancient units if you want to get anywhere.
They are like roman numerals, still around, but highly impractical to work with.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

@badidea

1 foot pound , is like saying something similar
1 meter kilogram

How much energy does it take to raise 1 kilogram , 1 meter , in one second...

Any mass per period , can be expressed in Joules.

E = mass * period ^ 2

Where foot pound:
mass = 1 pound
period = 1 foot in one second , converts to velocity ? . to be mass * velocity ^ 2 = Joules
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Back to work , on the data compressor!!!!
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

I think they need to adjust the meter , so that the speed of light is an even number of meters per second..

I think they need to adjust the calendar , to coincide with the solstices and equinox.. Tropics and equator..
maybe:
4 to 7 months up from the equator.
4 to 7 months down from the equator.
To make 8 to 14 months a year.

8 months a year
month 1) equator , north mid tropic
month 2) north mid tropic , north tropic
month 3) north tropic , mid north tropic
month 4) north mid tropic , equator
month 5) equator , south mid tropic
month 6) south mid tropic , south tropic
month 7) south tropic , south mid tropic
month 8) south mid tropic , equator
8 months a year , seems to be the best idea!!!!

8 months = 45.65625 days per month.
So maybe you would do 10 months instead of 8 , divide the north and south tropics into 5 months each.
10 months = 36.5 days a month. every other month would have an extra day.
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Squares

Post by Richard »

@Albert. YOU are WRONG.
You have not realised the differences between forces, torques or energy.
Force * distance inline = energy.
Force * distance sideways= torque.

The metre was defined by the speed of light long ago.
Speed of light is exactly = 299,792,458.000 metres per second.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

@Richard

Foot pounds in Joules

https://www.google.com/search?client=ub ... 8&oe=utf-8

Foot pounds are an energy , they are a mass per measure = Energy

In auto mechanics, they have a "torque wrench" that converts a torque force ( energy ) to foot pounds.. Joules , to foot pounds.
You don't see the Joules , you just press on the wrench ( insert energy ) and it tells you the foot pounds..

You can also convert calories and BTU's to and from Joules..
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Squares

Post by Richard »

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

@Richard

Torque is Force times distance.

Energy also is force times distance. The difference is that force and distance to calculate energy is a dot product, meaning we want the distance in the direction of the force, and force times distance for torque is a cross product, meaning that we want the component of force perpendicular to the distance. Think of a lever arm. Torque is the force applied to the lever times the lever arm length. This force can do work, and it is force times distance moved, same as torque times angle moved. E=τθ. So if you want, torque is energy per unit angle, but angle has no units.

Energy per revolution is a usable definition of torque, especially as applied to engines. That’s why torque times revolution rate is energy rate, i.e. power.
badidea
Posts: 2586
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Squares

Post by badidea »

albert wrote:... but angle has no units ...
There are many, the radian is mostly used now: https://en.wikipedia.org/wiki/Angular_unit
But since rotation of a point mass is meaningless, rotation of an actual object can be calculated as movement over a distance (length) of many small parts the shape consists of.
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Squares

Post by dodicat »

Simple practical use of dot and cross products.
(Not torque * twist)

Code: Select all

Type pt
    As Single x,y,z
End Type

Function length(p1 As pt) As Single
    Return Sqr( (p1.x)^2 + (p1.y)^2+ (p1.z)^2)
End Function

Function unit(p1 As pt) As pt
    Dim As Single L=length(p1)
    Return Type(p1.x/L,p1.y/L,p1.z/L)
End Function

#define dround(n,places) mid((str(int((n)*10^(places)+.5)/10^(places))),1,instr(ltrim(str((n)),"-"),".")+(places)+1)
#define onscreen (mx>0) and (mx<xres) and (my>0) and (my<yres)
#define incircle(cx,cy,radius,x,y) (cx-x)*(cx-x) +(cy-y)*(cy-y)<= radius*radius

Const pi=4*Atn(1)

Function dot(v1 As pt,v2 As pt) As Single 'dot product |v1| * |v2| *cos(angle between v1 and v2)
    Return v1.x*v2.x+v1.y*v2.y+v1.z*v2.z
End Function

Function cross(v1 As pt,v2 As pt) As pt '|cross product|= |v1| * |v2| *sin(angle between v1 and v2)
    Return Type(v1.y*v2.z-v2.y*v1.z,-(v1.x*v2.z-v2.x*v1.z),v1.x*v2.y-v2.x*v1.y)
End Function

Function getangle(p() As pt) As Single
    Dim As pt L1=(p(1).x-p(2).x,p(1).y-p(2).y)'leg 1
    Dim As pt L2=(p(3).x-p(2).x,p(3).y-p(2).y)'leg 2
    Dim As Single angle=Acos(dot(unit(L1),unit(L2)))*(180/pi)'angle between legs in degrees
    If cross(l1,l2).z>0 Then angle=360-angle
    Return angle
End Function


#macro display
angle=getangle(p())
Screenlock
Cls
Color 15
Draw String (20,20), "Drag circles by leftmouse button"
Color 3
Draw String (20,40), "Angle from red to green line (clockwise) in degrees"
Color 15
For z As Long=1 To 3
    Circle (p(z).x,p(z).y),5,7,,,,f
Next
Line(p(2).x,p(2).y)-(p(1).x,p(1).y),2
Line(p(2).x,p(2).y)-(p(3).x,p(3).y),4
Color 3
Draw String(p(2).x+20,p(2).y),Iif(Instr(dround(angle,2),"."),Rtrim(dround(angle,2),"0"),dround(angle,2))+chr(248)
Screenunlock
#endmacro

#macro mouse(m)
Dim As Long x=mx,y=my,dx,dy
While mb = 1
    Display():Sleep 1,1
    Getmouse mx,my,,mb
    If onscreen Then
        If mx<>x Or my<>y  Then
            dx = mx - x
            dy = my - y
            x = mx
            y = my
            p(m).x=x+dx
            p(m).y=y+dy
        End If
    End If
Wend
#endmacro

Screen 19
Dim As Integer xres,yres
Screeninfo xres,yres
Dim As pt p(1 To 3)={(100,100),(300,200),(200,400)} 'arbitary starting points
Dim As Integer mx,my,mb
dim as single angle
Do
    
    Getmouse(mx,my,,mb)
    display:Sleep 1,1
    For n As Long=1 To 3
        If incircle(p(n).x,p(n).y,10,mx,my) And mb=1 Then
            mouse(n)
        End If
    Next n
Loop Until Len(Inkey)

  
I hope your codepage uses chr(248) for the degree symbol.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

@badidea

You were wrong , about the hand clapping..

If i clap my hand together at a certain speed , it makes a sound..
if i clap at a low speed it doesn't make a sound..

It doesn't make a sound , not because the frequency is too low to hear..
It doesn't make a sound , because the duty cycle , is less that that required by the air to vibrate..

If i pulse a speaker at 18 Hz , you can't hear it..
If i pulse the speaker 18 times a second at 100 Hz you can hear each 18 pulses..

So air , liquids and solids have a minimum duty cycle (acceleration) , required to make vibrations..

In air the greater the Joules the farther the vibration travels..
1 watt will travel 1/4 mile , 5 watts will travel 5 miles..10 kilowatts will travel 100 miles.
Last edited by albert on Jun 27, 2019 2:49, edited 1 time in total.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

So:

To sum up waves: ( from my observations )

You have two types of waves..

1) Primary or Incidental , ( have the characteristics of various dimensions of cones , tubes , splatters )
2) Secondary or Post Incidental, ( have the characteristic of mounds , ( trough , peak , trough ) )

Primaries are caused by ; collision of objects with water , or Secondaries colliding with other Secondaries or shores or cliffs.

Wind blowing across the surface of the water ( prolonged collisions ) , can cause "white caps" , Primaries , (choppy seas).
Locked