I converted the text image using Rotate and Translate functions.

logo[shape_, {fontsize_, p_, rotation_, q_}, opt___] :=  Graphics[Rotate[ Table[Rotate[
 Translate[ Rotate[Text[Style[StyleForm[shape, FontFamily -> "Georgia"], fontsize,  
     Black ], {0, 0}], rotation, {0, 0}], {p, 0}], r, {0, 0}], {r, 0, 2 \[Pi] - 0.01, 2 \[Pi]/q}], 0, {0, 0}], opt, PlotRange -> 1, Axes -> True, ImageSize -> 600, Background -> White ];  
logo["\[Pi]", {150, -0.1, 5.2, 8}] 

And I obtained the following output for the input conditions.

enter image description here

I applied Plot Range to enlarge the graph.

logo["\[Pi]", {150, -0.1, 5.2, 8}, PlotRange -> 0.4]

enter image description here

This is not how I want the output to be. Why is the graph not enlarged and the shape changed?

enter image description here

As shown in the figure above, I wanted to get a full graph within the same size. How should I modify the code?

  • $\begingroup$ I applied Plot Range to enlarge the graph. if you want to use plot range as a parameter to be passed to the function, then why do you have it hardcoded in the function body as PlotRange->1 as well? $\endgroup$
    – Nasser
    Oct 21 '21 at 5:04
  • $\begingroup$ At first, it is to observe as a whole the state of parallel movement from the position of the initial figure. Afterwards, when I have finished all the movements, I want to enlarge the finally drawn shape without any margins. $\endgroup$
    – user21427
    Oct 21 '21 at 5:31
  • 1
    $\begingroup$ The issue is that the font size is relative to your screen, not relative to plot coordinates (i.e. the same font size will lead to the same size for the letters, no matter what plot range you use). You need to change the font size to something like 350 for it to work $\endgroup$
    – Lukas Lang
    Oct 21 '21 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.