New Blog Up: Projectile Motion



#2

Projectiles - A Realistic Point of View (Linear Drag)

Eddie's Math and Calculator Blog

A challenge for the programmers here perhaps, make an RPN/RPL version. (I used a Casio Prizm for this blog)


#3

On HP50G/RPL, Simple Projectile Motion to begin :

«
'(v0*t*COS(a),v0*t*SIN(a)-g/2*t^2)' 'EQ' STO
{ (0,0) (430, 80) { t 0 20 } 0 { (0,0) {10 10} } PARAMETRIC Y } 'PPAR' STO
ERASE
DO
{'v0','a','g'}
"Choose parameters or CANCEL"
OVER S~N
{1 3}
{67, 35, 9.80665} DUP
INFORM
NOT { DROP KILL } IFT
SWAP STO
DRAX DRAW {} PVIEW
UNTIL 0 END
»

'a' for 'theta' symbol.

Screen shot :

Note that, like with the Prizsm program, Hscale is different of Vscale. You may change the PPAR parameters to avoid distortion (to match the screen resolution)


Edited: 15 Mar 2012, 8:00 p.m.


#4

Nice post. Thanks..

#5

Thanks, Eddie. nice blog :-)

#6

Hi,

I don't understand what are the values that follows the LBL here :

Menu "Temperature","104°F/40°C",A,"95°F/35°C",B,
"86°F/30°C",C,"77°F/25°C",D,
"68°F/20°C",E,"59°F/15°C",F,
"50°F/10°C",G,"41°F/5°C",H,
"32°F/0°C",I
Lbl A : 1.1839 → P : Goto Z
Lbl B : 1.2041 → P : Goto Z
Lbl C : 1.2250 → P : Goto Z
Lbl D : 1.2466 → P : Goto Z
Lbl E : 1.2690 → P : Goto Z
Lbl F : 1.2920 → P : Goto Z
Lbl G : 1.3163 → P : Goto Z
Lbl H : 1.3413 → P : Goto Z
Lbl I : 1.3943 → P : Goto Z

Are they the result of : ρ = P / (R T) ≈ 352.9774471/T ?

I don't found the same values but 1.1922 for 0°C for example...

Edited: 16 Mar 2012, 5:42 a.m.

#7

HP50 : A More Realisitc View of Projectile Motion :

Reference :

Eddie's Blog

Balistique - trajectoire d'un projectile - Université de Clermont Ferrand .DOC


« 
'
(
COS(a)*m*v0*(EXP(k*t/m)-1)*EXP(-k*t/m)/k ,
-m*(((g*k*t-SIN(a)*k*v0-g*m)*EXP(k*t/m)+SIN(a)*k*v0+g*m)*EXP(-(k*t)/m))/k^2
)
'
'EQ' STO
{ (0,0) (180, 50) { t 0 20 } 0 { (0,0) {10 10} } PARAMETRIC Y } 'PPAR' STO
ERASE

DO

"Choose object"
{
{ "Baseball" { .3 .145 .041043 }}
{ "Tennis ball" { .6 .057 .003381 }}
{ "Golf Ball" { .4 .045 .001385 }}
}
1 CHOOSE NOT { KILL } IFT
{ 'c' 'm' 's' } STO

{'v0','a','g'}
"Choose parameters or CANCEL"
OVER S~N
{1 3}
{67, 35, 9.80665} DUP
INFORM NOT { KILL } IFT
SWAP STO

"Température"
{
{ "40°" 1.1839 }
{ "35°" 1.2041 }
{ "30°" 1.2250 }
{ "25°" 1.2466 }
{ "20°" 1.2690 }
{ "15°" 1.2920 }
{ "10°" 1.3163 }
{ "5°" 1.3413 }
{ "0°" 1.3943 }
}
4 CHOOSE NOT { KILL } IFT
'p' STO

'm*g/(√((2*m*g)/(c*p*s))' EVAL 'k' STO


DRAX DRAW {} PVIEW

UNTIL 0 END
»


#8

Very nice--especially with l'accent aigu :-) (how do you do that on 48G anyway?)


#9

You mean 'how to produce "accent aigu" and so on ' ?

I don't own a 48G but this works on my old 48SX :

Alpha Leftshift E Alpha Leftshift 7 : è

Alpha Leftshift E Alpha Rightshift 7 : é

Alpha Leftshift E Alpha Leftshift 8 : ê

Alpha Leftshift EAlpha Leftshift 9 : ë

(or just the necessary keys if you are Alpha locked. Ex : E Sihft 7

Since 49/50, you can, use CHARS

In the previous exemple,i used the excellent HPUserEdit to write the program (and its capacity to produce easily CHOOSE and INFORM structure)

Edited: 17 Mar 2012, 9:18 a.m.


#10

That is very cool--i just tried it.

Glad I asked--thanks!

#11

Speaking of coolness, I guess if I want to try running your routine on my 48G I should simply grab the text file and upload it through my good old-fashioned serial cable.....I admit that I haven't actually moved a program to/from my 48G(x) machines in about 4 months...


#12

To drag and drop the text file use this :

%%HP: T(3)A(D)F(.);
\<< '(COS(a)*m*v0*(EXP(k*t/m)-1)*EXP(-k*t/m)/k,-m*(((g*k*t-SIN(a)*k*v0-g*m)*EXP(k*t/m)+SIN(a)*k*v0+g*m)*EXP(-(k*t)/m))/k^2)' 'EQ' STO { (0.,0.) (130.,80.) { t 0. 20. } 0. { (0.,0.) { 10. 10. } } PARAMETRIC Y } 'PPAR' STO ERASE DEG
DO "Choose object" { { "Baseball" { .3 .145 .041043 } } { "Tennis ball" { .6 .057 .003381 } } { "Golf Ball" { .4 .045 .001385 } } } 1 CHOOSE NOT { KILL } IFT { c m s } STO "Choose parameters or CANCEL" { "v0" "a" "g" } { 1 3 } { 55 45 9.80665 } DUP INFORM NOT { KILL } IFT { v0 a g } STO "Temp\233rature" { { "40\^o" 1.1839 } { "35\^o" 1.2041 } { "30\^o" 1.225 } { "25\^o" 1.2466 } { "20\^o" 1.269 } { "15\^o" 1.292 } { "10\^o" 1.3163 } { "5\^o" 1.3413 } { "0\^o" 1.3943 } } 4 CHOOSE NOT { KILL } IFT 'p' STO 'm*g/\v/(2*m*g/(c*p*s))' EVAL 'k' STO DRAX DRAW { } PVIEW
UNTIL 0
END
\>>

PS: I don't use here the S~N command :i m not sure it works on a 48G and I change the H and V scale to do 45° is really 45° on the screen (for a 50G resolution)

I notice that a 45° throw, is not the longer at all. 30/35° are better (for golf). For baseball seem 15/20°


Edited: 18 Mar 2012, 6:19 a.m.


#13

I assume the fastest and easiest way to transfer a program from HPUserEdit 6 to a 50G would be via the SD card. In what format should I save it from HPUserEdit to the SD card to accomplish this and what would I have to do with the file on the 50G to be able to run the program?

Thanks in advance!


#14

To transfer on a real 50G I use an USB cable and the Conn4x software ( it is on the CD with the 50G)

Just save the HPUserEdit file without any extension. Then connect Conn4x with you HP50 and drag and drop the saved file in the Conn4x windows.

I must say that Conn4X is a very old and awfull program but i don't know a more recent program. I never used a SD card to transfer from PC to HP but i think it s possible.

#15

Looks better if enclosed in PRE tags and wrapped a little:

%%HP: T(3)A(D)F(.);
\<< '(COS(a)*m*v0*(EXP(k*t/m)-1)*EXP(-k*t/m)/k,-m*(((g*k*t-SIN(a)*k*v0-g*m)*EXP(k*t/m)+SIN(a)*k*v0+g*m)*EXP(-(k*t)/m))/k^2)'
'EQ' STO
{ (0.,0.) (130.,80.) { t 0. 20. } 0. { (0.,0.) { 10. 10. } } PARAMETRIC Y }
'PPAR' STO
ERASE DEG
DO "Choose object"
{ { "Baseball" { .3 .145 .041043 } }
{ "Tennis ball" { .6 .057 .003381 } }
{ "Golf Ball" { .4 .045 .001385 } }
} 1 CHOOSE NOT { KILL } IFT
{ c m s } STO
"Choose parameters or CANCEL"
{ "v0" "a" "g" }
{ 1 3 }
{ 55 45 9.80665 }
DUP INFORM NOT { KILL } IFT
{ v0 a g } STO
"Temp\233rature"
{ { "40\^o" 1.1839 }
{ "35\^o" 1.2041 }
{ "30\^o" 1.225 }
{ "25\^o" 1.2466 }
{ "20\^o" 1.269 }
{ "15\^o" 1.292 }
{ "10\^o" 1.3163 }
{ "5\^o" 1.3413 }
{ "0\^o" 1.3943 }
} 4 CHOOSE NOT { KILL } IFT
'p' STO
'm*g/\v/(2*m*g/(c*p*s))' EVAL
'k' STO
DRAX DRAW { } PVIEW
UNTIL 0
END
\>>

#16

Thanks Marcus ;) It's better like this !

#17

Cool. Next consider lift due to spinning.


Possibly Related Threads...
Thread Author Replies Views Last Post
  New HP 35S Programs posted on my blog Eddie W. Shore 2 1,106 06-08-2013, 03:47 PM
Last Post: Glenn Shields
  New Blog Post: Length of a Polynomial Segment Eddie W. Shore 1 837 01-17-2013, 08:56 PM
Last Post: Namir
  New Blog Entries Eddie W. Shore 0 680 11-11-2012, 04:21 PM
Last Post: Eddie W. Shore
  New Blog: Factorials Eddie W. Shore 6 1,638 10-21-2012, 11:27 AM
Last Post: Eddie W. Shore
  HHC 2012 Blog Entries Eddie W. Shore 8 1,690 10-01-2012, 05:15 AM
Last Post: rgray
  New Blog Entry: Honnold Mudd Library, World Series, and a HP 15C Program Eddie W. Shore 0 641 09-30-2012, 06:05 PM
Last Post: Eddie W. Shore
  New Blog Entry with HP 50g: Cartesian Coordinates to Pixel (Screen) Coordinates Eddie W. Shore 0 581 09-13-2012, 10:28 PM
Last Post: Eddie W. Shore
  Blog Entry: HP 71B Eddie W. Shore 6 1,567 06-06-2012, 02:35 PM
Last Post: Pete Wilson
  New Blog Entry: Elastic and Inelastic Collisions Eddie W. Shore 0 586 03-21-2012, 11:34 PM
Last Post: Eddie W. Shore
  New Blog Entry (repeated functions) is now up Eddie W. Shore 0 541 02-08-2012, 10:10 PM
Last Post: Eddie W. Shore

Forum Jump: