minhhieuh2003

85 Reputation

3 Badges

4 years, 215 days

MaplePrimes Activity


These are replies submitted by minhhieuh2003

@acer Thank you so much for your interest.
I want to insert 4 images into the table and burn them into an array and print to the screen. Thanks to this instruction, I did it. Very nice.

@tomleslie 

help me about add picture into procedure InsImage()?


 

Step1

 

TN1d_3td := proc () global trituyetdoi, TSprintf, ds1d_td3d, cau, da, R; TSprintf := proc () Typesetting:-mrow(seq(`if`(e::string, Typesetting:-mn(e), Typesetting:-Typeset(Typesetting:-EV(e))), e = [args])) end proc; cau := proc (ii) Typesetting:-mrow(Typesetting:-mtext("Câu ", "mathcolor" = "#ff0000", fontweight = "bold"), Typesetting:-mtext(sprintf("%d", ii), "mathcolor" = "#ff0000", fontweight = "bold"), Typesetting:-mtext(". ", "mathcolor" = "#ff0000", fontweight = "bold")) end proc; ds1d_td3d := proc (tuabai, cot1, cot2, cot3, cot4, rtc, { width::positive := 600, widthmode::(identical(pixels, percentage)) := ':-pixels' }) local r, topic, cot1in, cot2in, cot3in, cot4in, dsdsds, ii, chuoi; chuoi := 1; ii := 1; da[rtc] := "A"; print(cot1); topic[rtc] := tuabai; cot1in[rtc] := cot1; cot2in[rtc] := cot2; cot3in[rtc] := cot3; cot4in[rtc] := cot4; R[rtc] := DocumentTools:-Layout:-Row(DocumentTools:-Layout:-Cell(DocumentTools:-Layout:-Textfield(DocumentTools:-Layout:-Equation(topic[rtc]), ':-alignment' = ':-left'), ':-columnspan' = 4)), DocumentTools:-Layout:-Row(DocumentTools:-Layout:-Cell(DocumentTools:-Layout:-Textfield(DocumentTools:-Layout:-Equation(Typesetting:-mrow(TSprintf(cot1in[rtc]))), ':-alignment' = ':-left'), ':-columnspan' = 2), DocumentTools:-Layout:-Cell(DocumentTools:-Layout:-Textfield(DocumentTools:-Layout:-Equation(Typesetting:-mrow(TSprintf(cot2in[rtc]))), ':-alignment' = ':-left'), ':-columnspan' = 2)), DocumentTools:-Layout:-Row(DocumentTools:-Layout:-Cell(DocumentTools:-Layout:-Textfield(DocumentTools:-Layout:-Equation(Typesetting:-mrow(TSprintf(cot3in[rtc]))), ':-alignment' = ':-left'), ':-columnspan' = 2), DocumentTools:-Layout:-Cell(DocumentTools:-Layout:-Textfield(DocumentTools:-Layout:-Equation(Typesetting:-mrow(TSprintf(cot4in[rtc]))), ':-alignment' = ':-left'), ':-columnspan' = 2)), DocumentTools:-Layout:-Row(DocumentTools:-Layout:-Cell(DocumentTools:-Layout:-Textfield(DocumentTools:-Layout:-Equation(Typesetting:-mrow(Typesetting:-mtext(cat(seq(" ", ij = 1 .. chuoi))), Typesetting:-mtext("A", "mathcolor" = "#ff0000", fontweight = "bold"), Typesetting:-mtext(". ", "mathcolor" = "#ff0000", fontweight = "bold"), TSprintf(dsd))), ':-alignment' = ':-left'), ':-columnspan' = 1), DocumentTools:-Layout:-Cell(DocumentTools:-Layout:-Textfield(DocumentTools:-Layout:-Equation(Typesetting:-mrow(Typesetting:-mtext("B", fontweight = "bold"), Typesetting:-mtext(". ", fontweight = "bold"), TSprintf(dsss1))), ':-alignment' = ':-left'), ':-columnspan' = 1), DocumentTools:-Layout:-Cell(DocumentTools:-Layout:-Textfield(DocumentTools:-Layout:-Equation(Typesetting:-mrow(Typesetting:-mtext("C", fontweight = "bold"), Typesetting:-mtext(". ", fontweight = "bold"), TSprintf(dsss2))), ':-alignment' = ':-left'), ':-columnspan' = 1), DocumentTools:-Layout:-Cell(DocumentTools:-Layout:-Textfield(DocumentTools:-Layout:-Equation(Typesetting:-mrow(Typesetting:-mtext("D", fontweight = "bold"), Typesetting:-mtext(". ", fontweight = "bold"), TSprintf(dsss3))), ':-alignment' = ':-left'), ':-columnspan' = 1)); return NULL end proc end proc:
NULL

NULL

``

NULL

Step2

 

InsImage := proc (ii) local tuabai, dsd1, img1, img2, img3, img4, col1, col2, col3, col4; global dsd, dsss1, dsss2, dsss3, G; TN1d_3td(); dsd := "Image 1"; dsss1 := "Image 2"; dsss2 := "Image 3"; dsss3 := "Image 4"; tuabai := TSprintf(cau(ii), "Please give image  "); img1 := ImageTools:-Read(FileTools:-JoinPath([kernelopts(datadir), "images", "phone.jpg"])); img2 := ImageTools:-Read(FileTools:-JoinPath([kernelopts(datadir), "images", "lichtenstein.jpg"])); img3 := ImageTools:-Read(FileTools:-JoinPath([kernelopts(datadir), "images", "tree.jpg"])); img4 := ImageTools:-Read(FileTools:-JoinPath([kernelopts(datadir), "images", "undercarriage.jpg"])); col1 := TSprintf(ImageTools:-Embed(img1)); col2 := TSprintf(ImageTools:-Embed(img2)); col3 := TSprintf(ImageTools:-Embed(img3)); col4 := TSprintf(ImageTools:-Embed(img4)); ds1d_td3d(tuabai, col1, col2, col3, col4, ii) end proc

InsImage(1)

Parse:-ConvertTo1D, "invalid input %1", (Typesetting:-mi("Typesetting:-mrow", italic = "true", mathvariant = "italic"))([])

(2.1)

inbai3(1, 1, widthmode = percentage, width = 100)

NULL

NULL

``

``


 

Download help_insert_picture.mw

 

@acer can't use InsertContent()?

@acer Thank you very much.Thank you very much.

@Kitonum Thank you very much. I see.

@mmcdara 

Very good. Thank you.

@Carl Love

display(line([.8, 0], [1, .2], color = red), line([.6, 0], [1, .4], color = red), line([.4, 0], [1, .6], color = red), line([.2, 0], [1, .8], color = red), line([0, 0], [1, 1], color = red), line([0, .2], [.8, 1], color = red), line([0, .4], [.6, 1], color = red), line([0, .6], [.4, 1], color = red), line([0, .8], [.2, 1], color = red), rectangle([0, 1], [1, 0], color = red, transparency = .5, thickness = 1), axes = none)

@tomleslie  Thank you very much

i'm very glad because you anwser. 

@acer Can you help me, please?

 

@tomleslie that's good idea.

@Kitonum I use maple 2017 but result return 2 roots 1 and 8.95..

 

@acer Thank you very much.

@acer Thank you very much. Have a good time!

@acer Thank you very much

@tomleslie Thank you very much

1 2 3 Page 1 of 3