135 Reputation

6 Badges

11 years, 335 days

MaplePrimes Activity

These are replies submitted by das1404

HI Carl,

     Thanks for the proc for the animated, super technicolor letter M.  It works on Maple 7 without any modification, as you expected.  I was planning on sending you a gift of the name I was recently working on: JEREMY.  I find the work quite labour intensive, as the spacing of the letters, color, need to be taken into account.  I'd like to have a library of programs for the letters, and a program which just takes the person's name and assembles the letters.  With JEREMY I have the stalk of the letter R kick a football, which goes towards the letter Y, whose arms morph into the shape of an American football goalpost.  I'll send that when I get my computer running again. The M you've done is very impressive with metallic looking letters.  Thanks again.  David.


Apologies for the late reply:  I was out all day yesterday.  I could kick myself for my stupidity!  Carl's initial explanation regards the structure was succinct and clear - but somehow my mind was focussed on the program.  I somehow thought (wrongly) that the color option was special and that was the reason it was embedded in the polygon statement.   ...and all polygons had to obey the options in the opts.  It was only after I looked at the program output and didn't like the black patch boundaries around the sections of the M, that I tried to add to the code - patchnogrid for the "rainbow" colors, but patch for white, as otherwise it is white on a white background.   A typo of a missing ] bracket didn't help - but finally it worked.  I now see that one can have options within each polygon brace, and also possible options which refer to the list which is being displayed.

   Have downloaded your program, but have yet to test it out.  

   My next challenge for myself is to see if I can get the sections of the M display in random colors using macros eg macro(Col2= COLOR(RGB, rnd(), rnd(),rnd() )

Cheers and thanks again,  David 

Thanks heaps Tom for tidying the program, and more importantly for removing a glitch in my program.  ie the M "blipped" owing I think to the wrong number in the sequence 1...24,23...1.  I'd spent ages trying to fix it, but after Carl's previous reply, I had decided to live with it!  In the name I was working on, the previous letter serendipitously touched the letter M, making it look as if the M had been knocked!   ...something I'd not be able to deliberately program myself!  ...so, not being able to rid the blip I'd left it in.

   Other minor problems:

      I could not download the mPlot.mws program.  I tried and found the code gobbledy-gook when viewed in a text editor!  I copied the screen text to a text editor, and pasted it into a Maple 7 and ran it.  The ensuing plot output was perfect, with the M going up and down in multi colors as intended.  However, prior to the plot output, it came up with the error message:

Error, wrong number (or type) of parameters in function seq.

   The offending piece of code was   ...,seq(j, j=23..1,-1)

Maple 7 doesn't cater  for the negative feature.   Well - it does because the program worked!   I merely replaced your code with my original list of [1,2,...,23,24,23..2,1] and it worked without the error message appearing. I'm surprised that the program worked after the error message.  All I can think to explain it, is that Maple recognises the code comes from an expert such as youself, and it behaves itself!!:-)

Thanks again for your help: you've made my day.


Thanks for the info.  David.


This attached program morphs the letter Y into an American football goalpost.  Rather than use the line command that you and Rouben suggested I have used rectangles and polygon commands.  It is in a proc with parameters to change:

h, the height of the Y; base, the base width;  w, the width of the arms and upright (these are all the same)  ;  alfa - the angle the arms make with the horizontal (in radians)

 It seemsto work OK, but I have a printlevel:=5;  statement near the beginning of he program. If I change this to anything less than 5, I don't geet any plot output.  There are no error messages - just not the output I wanted.  With printlevel:=5, there is too much output.  I suspect there's an easy solution to this.  Any suggestions to improve this would be great!

solve (x-3), solve (x-3=0)  work but not many of the options using brackets.  The reason for my using solve is that I realised -rather late! - that I made a mistake in my math calculations for drawing a 2-dimensional block letter Y, height h, of base length base etc, and got as far as doing an animation of the Y with the polygonal left arm split into two polygons to morph into the American style goal post.  I realised my error when the two subdivided polygons did not align with the original left arm of the Y.  My error was a math one, owing to my not having drawn a good enough diagram of the Y, resulting in some faulty assumptions, and hence wrong formulae.  I need to reconsider the variables used and my method.  Rather disappointing as I was going well till I discovered this.  Thanks for your comments.

@Rouben RostHamian  

I tried your program and it didn't  work.  However, by putting curly braces (set notation) around the two points in the pointplot command for U, and putting connect=true, it ran well.

  Thanks for your input.

Thanks for that, but unforrtunately I had trouble.  I suspect there is a bug in the Maple 7 solve command, as the program below gives error messages, except the last.  It makes me smile about Maple 7's introductory statement of " Command the power of 1000 mathematicians"!


#Error, (in solve) invalid arguments - for statement below - and above
#...but Maple can solve this one!

Error, (in solve) invalid arguments





Download easy_equations.mws


I got it to work in Maple 7, as you can see below.  The animation is a little different, moving from the central portion of  the arms. One observation is the use of 'thickness'.  For large values, say greater than 5, the lines are chunky and there is a gap at the meeting point - something OSH, (Occupational Safety and Hazrds) wouldn't  take kindly!:-)   Is there a way of removing, or making it smaller?  One way is to restart and draw polygons instead, but I just wondered if there was a "quick fix" in higher versions of Maple. In Maple 7 I'm unsure as to the maximum value of thickness: the documentaion mentions 3 or 4, but I used larger values and the resulting lines seemed thicker.  .    

# # # # # # # # # # # # # # # # # # # # # # # # # # # #
#  Letter Y morphing - with help from Tom Leslie
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
  nframes:=40:  # of frames
#Upright central post
#l2 & l4 on lhs
#l3 & l5 on rhs
d:=display([l1,l2,l3,l4,l5],color=red, thickness=12):
display(seq(d, t=0..nframes),insequence=true, axes=normal);


Warning, the name arrow has been redefined

Warning, the name arrow has been redefined




Download Lett_Y_morphing_tl.mws



  Thanks for your input.  Unfortunately Maple 7 does not have the provision in the seq command to increment by floating point values, so I'll have to think about a workaround.  Interestingly, it does have provision for a'stepsize' in the 2D plotting of differential equations.

  Also, for the final picture I want to display polygons, instead of lines, as the Y ismade up of three polygons - the two 'arms' and the upright.  Again, thanks for your ideas.


Many thanks for your comments.  ...and good on you for admitting you were wrong.  Your comment is instructive: I'm hoping I won't make that mistake again.  D


Owing to my getting two responses, and you mentioning "strings can not act as names" I'm a little confused.  I'm unsure about some terminology: I take it that a 'name' is the left hand side of an assignment statement.  eg x:=3:  Here x is the name.  On first reading I thought strings were a no-no as formal parameters in a proc.  I used integers as the formal parameter, but on re-reading your answer, I seem to think that case 2 is covered by case 1. Also Tom Leslie didn't mention anything about 2.  Please comment.

  ..and again many thanksfor your responses.     

@Rouben Rostamian

  Thanks for the program.  You use a command 'Typesetting' quite a lot, which isnot recognised in Maple 7.  Regards the 'Tom' part - below is a section of my code which generates textplots of the nameP1:=`Tom`: for the upward curved path.  (The nameP2 was there for the straight down path.)  The sequence of textplots were put in a plots[diplay](... for the animation. 



for t from 0 to num1  do


end do:


   Thanks for the useful ideas, and your time.


@Rouben Rostamian  

Thanks Rouben, but unfortunately I only have Maple 7 so cannot view .mw files- only .mws.   You seem to be using the tubeplot command which does give a much better definition of the track.  Missing from your animation is the name 'Tom' on both the curved portion, and the straight steep downhill section.  The name was written using textplot, but at times the name became hidden.

   I'd appreciate a .mws copy of the program, or better still a Rich Text format of the program.  This is done by copying and pasting your Maple program into a Word document,, then saving it in .rtf format.

Thanks, David .


Thanks.  Much appreciated.

1 2 3 4 5 6 7 Page 2 of 8