das1404

110 Reputation

6 Badges

7 years, 25 days

MaplePrimes Activity


These are replies submitted by das1404

 

Thanks for your constructive reply.  My question was originally about the textplot command, but I see from your reply my mistake is a lack of understanding of the display command.  eg

display(draw([c1, c2, c3, ra12, ra13],
             color=[red, blue,gold, magenta,grey, black]),
        t1, t2, t3, axes=normal);

This works.  I've always wondered why the display command was necessary, because I've always used it in conjunction with the plot command - so I thought the word display was superfluous!:-)  I was surprised the above display worked as the number of colors was more than the number of objects.  There isn't much description of the display command in the Help sections.

  Also 'simplify' - any comments on that?

Thanks again.

  David 

@tomleslie 

Thanks for the advice.  I'm still unsure as to what caused it, as looking at my code after a night's sleep & a reboot, I noticed I had intended to test if the program drew the circle with $plots[display](c,   ...) and noticed my typo of $ instead of #  (In my defence I'm awaiting a cataract operation!)  I have changed the code to use seq instead of the $ symbol and it works fine without the error message. So, I'm not sure if the error message was caused by that, or the computer starting afresh ignored the 'error'.

   I'll leave the maple.ini file alone.  First time I've learned about its existence!

 Again, thanks for all your help.   David  

Thanks for the valuable comments.  After saving the Maple program and shutting down the computer completely, today when I went to look at the program, amazingly it worked perfectly!  I'm still unsure of the reason for its behaviour, but I had been trying various methods, placing items in the plot list in a different order, changing the seq to non-subscripted variables...  My opinion is that either the operating system (Windows 7) and/or Maple got confused somehow and failed to work as expected.  Thanks again for your help.  David

Thanks again for your useful comments.  David

Thanks for the lesson.  To me the use of eval to find a decimal, or floating point value, seems counter intuitive, as I seem to want to use evalf.

   David

I tried your suggestion and it worked...  ...but the output is required in floating point form. Below is some of my frustrated attempts to get V in numeric form.

L1:=select(hastype,L2, nonreal(float));
LR:=remove(hastype,L2, nonreal(float));
L3:=selectremove(hastype,L2, nonreal(float));
#LR := [{V = 1193.173195, alfa = -2.782684163}, {V = 1193.173195, alfa = .3589084909}]
whattype(L2);  # list, but L3 is an expression sequence
whattype(LR[1][1]);  # gave =
LR[1][1]; #gave V = 1193.173195

#I was surprised at the latter as LR[1] is a set, where there is no ordering. 

LRstring:=convert((LR[1][1]), string):
ffL:=1+FirstFromLeft("=", LRstring):
#number_string:=SubString(LRstring, ffL..nops); # Error
#number_string:=SubString(LRstring, ffL..nargs);# Error
number_string:=SubString(LRstring, ffL..20);    # not the best - but works!
V:=convert(number_string,decimal, hex );
whattype(V);
evalf(V);
#...but I'm no closer to using V as a a number in any calculations

Any help gratefully received.

David

Thanks for that Carl.  I haven't tried them yet, but having just browsed through the Maple 7 Help, select, remove, and selectremove are mentioned: the latter being claimed to be more efficient.  It outputs the two in one statement.  Going out now, but will try & get back to you later for confirmation.

  David

@tomleslie 

Thanks for that, but sadly it didn't work.  I think it balks on the type~   : Maple 7 has type::=  where the ::= means "is defined to be".  I'll investigate the type statement further.

David

@Carl Love 

  To answer your initial response I was trying all possible methods I could think of to eliminate the printed output,yet have the plots.  It was annoying and frustrating.  I think you gave me similar advice before, but seem to recall you mentioning lprint - which doesn't work as well as print.  I tried your suggestion and was staggered to see that it worked!  It seems counter intuitive and just too simple!

    The program was just an investigative look at the paths of projectiles under different conditions viz air resistance, versus no air resistance.  I'm planning on having a procedure which takes the maximum height and range as parameters, and outputs the desired trajectory.  ...but there's all sorts of possibilities in my mind - multiple bounces, rolling (as a golf ball on the green), and Netball on Neptune!:-)

Thanks again.  David    

@tomleslie 

Thanks for that. As before, I still had trouble with the download: I ended up with a filename plotProb.mws.txt   ie it had added a further extension .txt to your filename.   Am not sure if I am doing something wrong.  Carls suggestion of using the print command worked - so I must remember that in future.

Cheers,  David

In  A:=(1 - cos(s)^2)/sin(s)^2;   I was thinking the squaring was just squaring the bracketed (s).

This expression is safer:  (1 - (cos(s))^2)/(sin(s))^2; and should equal 1.     ...but I may be wrong re Maple being able to recognise that the trig functions are being squared.  David.

@Carl Love    Above is an attempt at some of your suggestions.  I managed to work on the the letter Y, which I thought would be the most difficult, but it wasn't as bad as I had imagined.  The ball's speed is faster and it clears the bar.  I'd like the ball to start at the base of the stalk, to give the impression it's been kicked, but there's no way to do that and alter its height with the present proc.  I intend to rewrite the ball proc, making it more generic, so that I can alter not just the trajectory, but the ball's size and color, so that I can cater for the like of a golf ball..

  Thanks again for your support and inspiration.  David

@Carl Love

Thanks for your interesting comments regards the animated name JEREMY..  Regards you saying the left upright of R shoud be thicker, since first reading your comments, I forgot you said 'thicker' and went to change it - and have made it thinner!  Initially I thought it was going to be an extremely easy fix of altering the parameter value of the thickness, w, of the upright of R from w=1.55 to 1.4.  The problem is the way I've designed the R, a lot of things are dependent on w.   For example, the radius of the two semicircles change - the smaller w, the chunkier the curved portion becomes.  I thought your comment about the R interesting, because I did have issues with the R - but not because of the upright thickness!  i thought the outer ( & inner ?) radius of the R were too big and didn't quite match up with the other sections of the R - but now I'm beginning to think it might be astigmatism, or failing eyesight on my part!   The lesson I've learnt is that designing things with Maple is to break the problem down into smaller independent chunks - something I could have done with the R.  Another problem with the R is that the stalk is of width w at the foot: it should really be of the same width!  As the stalk kicks the ball it gets thinner.  It is possibly imperceptible for small angles, but I'd like the ball to have a good kick!

...so a rewrite of the R seems to be the case.  Designing the letters has given me more admiration for the people who design fonts: it is not as easy as I had first imagined.

      Similarly with the football.  The code for that was for the name KEITH, where the K kicked the ball betwee the uprights of the H.  The ball didn't quite go high enough, so I cheated, and instead of making the ball go higher, I altered the height of  the bar of the H!   ...not quite so easy with an American goalpost!   I'll try and rewrite a 'ball' procedure so the ball travels in a parabolic arc - relatively easy to do.  I was originall quite pleased with my initial ball coding as the ball rotated while travelling through the air.  Problems arose when one studied its projectory - it went haywire!

The speed of the transformation of Y.  The above problems I think I can handle, but the speed of transformation of Y may be beyond my ken.  Initially I thought the problem easy - just reduce the number of frames from 48 to say, 24, and the speed of transformation is increased.  The problem is that the Y is complete and in its place is blank.  (This is a general problem in developing a name - all the letters have to be synchronised with roughly the same number of frames.).   To get round this I was thinking of doing something similar to the coding of the M in JEREMY, where I had a list of frames to make the M go up and down.  For the Y the first few frames could be the animation of the Y morphing into a goal post, and the remaining frames are padded out with a fixed frame of the goalpost.  It would be nice to reverse the morphing to go back to a Y after the ball has passed through the posts:  this would make the animation 'blip free' in the Continuous mode.  I'd appreciate your feedback regards my ideas on the speed of the Y - but no doubt you have several more methods of doing it !:-)

   I recently did a name THANE ...   as in Shakespeare's Macbeth, Thane of Cawdor.  The person's name is ETHAN - I'm thinking they'll think I've got their name wrong - as I've written a program for the E to translate from the end to the beginning.  I did that as a precursor to another name CAMERON, which is an anagram of 'Romance'.

   I'm also looking for ideas for a a golfing theme, as I have a friend ROBERT who is a keen golfer...   but I'm short on ideas of how to incorporate his name - BOB, ROB - into a golf theme.  I had thought of the letter L as a putter hitting a golf ball - but there's no L in his name:-(

   Thanks again for your feedback.  David.      

       

Jeremy4.mwsJEREMY4.txt.

Attached are the Maple 7 program for the name JEREMY and a text version.   This is an updated version of the previously posted gif file.  The sections of the program areas follows:

ball_kicked  This gives the trajectory of the ball.  However it suffers from being difficult (impossible?) to alter the height reached.  Then the letter J.

E  Credit goes to Tom Leslie for help with this on a previous name KEITH, This only contains one letterE: Jeremy contains two Es and I'd like to be able to change the colors of the Es to be different.

R   This allows for two versions, and only one is required here.  Earlier I was working on the name KERRY - and I wanted to change the colors of the two Rs.  

M   Credit goes to Carl Love for this amazing multi-colored display!   The only change I made was a change in the number of frames to make it compatible with other letters.

Y   The arms of the Y have been coded separately, to give the impression that the ball goes between the posts.  I found this relatively difficult/time consuming.  It could be improved by morphing the goal post back to its original Y.  The ball_kicked routine originally came from a previous name KEITH, I made where the letter K kicked the ball through the posts of a rugby union/league style (English?) H shaped posts.  In that I made the H in three rectangles and it was easy to animate the bar so that it lowered to accomodate the ball.  With the American style goal post this is not as easy.

    Thank you for the "Very Easy" display.  I was aware of Maple 18s advanced letter capability, but wondered if it was possible to easily break apart the letters - as I have done with the letter Y?

  I'm interested in other ideas re animation with letters.  eg I'd like to do one with say the animation of a golf ball - with the letter L being the putter.  

  Thanks for your input.  David

 

This is the animated gif of JEREMY.  The letter M is nothing like as good as the technicolor vrsion!  I haven't given the Maple code as I'm rather embarrassed about the time I've spent writing it and how messy and long it is.  However, if you want a copy you just have to ask.  Cheers.

   David   

1 2 3 4 5 6 7 Page 1 of 8