Message Boards Message Boards

2
|
6030 Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Orient properly real-life images based on math curves ?

Posted 7 years ago

I am doing a project for school. I have successfully created three images, but on the final one for some reason the image is basically squished. There isn't anything wrong with my syntax (that I know of) but any suggestions would be greatly appreciated! I've attached two images: the woodpecker that I'm having issues with and a hummingbird that I completed.

Also, I originally used Desmos to design the images so here is what the Woodpecker should look like.

https://www.desmos.com/calculator/bempx6qwaj

enter image description here

CODE:

Show[{Plot[30 (x + .6), {x, -.8, -.4}], 
  Plot[.7 Sin[x - 1] + 2.68, {x, 2, 3.18}], 
  Plot[.7 Sin[x + .2] + 3.45, {x, 3.141, 4.3}], 
  Plot[.07 x^2 + 1.5, {x, 3.2, 4.262}], 
  Plot[.7 Log[x] + 1.6, {x, .25, 2.1}], 
  Plot[-1.4 (x - 1.7)^2 + 1.8, {x, .55, 2.485}], 
  Plot[Log[x - .12], {x, .139, 1}], 
  Plot[Sqrt[.022 - (x - 2.5)^2] + 3.1, {x, 0, 5}], 
  Plot[-Sqrt[.022 - (x - 2.5)^2] + 3.1, {x, 0, 5}], 
  Plot[Sqrt[.01 - (x - 2.5)^2] + 3.1, {x, 0, 5}], 
  Plot[-Sqrt[.01 - (x - 2.5)^2] + 3.1, {x, 0, 5}], 
  Plot[Sqrt[.004 - (x - 2.5)^2] + 3.1, {x, 2.51, 2.7}], 
  Plot[1.6 (x - 1.8), {x, 2.443, 3.2}], 
  Plot[7 (x - 1.76), {x, 2.06, 2.1}], 
  Plot[-.5 E^(x - 1) + 3.86, {x, .87, 2.097}], 
  Plot[-.28 x + 3.85, {x, .93, 2}],
  Plot[-.01 x + 2, {x, 1.8, 2.46}],
  Plot[.89 (x - .25), {x, 2.45, 2.75}], 
  Plot[-20 (x - 2.85), {x, 2.725, 2.739}], 
  Plot[-1.6 (x - 2.5)^2 + 3.33, {x, 2.2, 3.314}], 
  Plot[-2 ArcTan[x] - .3, {x, -.575, -.25}], 
  Plot[4 (x - 1.4), {x, .63, 1.32}], 
  Plot[1.1 (x - .35)^2 - 3.1, {x, .65, 1.7}], 
  Plot[2 (x - 1.5)^2 - 1.1, {x, 1.69, 2.5}], 
  Plot[2.7 (x - 1.7), {x, .2, .777}], 
  Plot[-1.3 (x - .8)^2, {x, .8, 1.71}], 
  Plot[2 Tan[x - 1.3], {x, .19, .92}], 
  Plot[.7 (x - .7)^3 - 3.5, {x, -.7, .147}], 
  Plot[Sqrt[.02 - (x - .99)^2] + 3.45, {x, 0, .947}], 
  Plot[-Sqrt[x + .5], {x, -1, .1}], 
  Plot[.8 (x - .1)^2 + .1, {x, -.256, .6}], 
  Plot[.5 Cos[x - .5] + 3, {x, .85, 2.4}], 
  Plot[.8 (x - .1)^2 + .57, {x, -.569, .8}], 
  Plot[2 x^2 - .2, {x, -.584, .2}], 
  Plot[Log[x] + 1.4, {x, .017, .28}], 
  Plot[1.5 x - 2.7, {x, -.726, .017}], 
  Plot[.9 (x - 2.1)^3 + 1.68, {x, 1.994, 3}], 
  Plot[-.7 (x - 6.35), {x, 3, 3.185}]}, PlotRange -> All, 
 AxesOrigin -> {0, 0}]
Attachments:
POSTED BY: Clarissa Hood
3 Replies

Yeah, @David Keith is absolutely right - just set AspectRatio -> Automatic. I really like your Hummingbird! What is your process, how are you making them? Also perhaps this blog will interest you: Making Formulas… for Everything—From Pi to the Pink Panther to Sir Isaac Newton - it also makes curves from images but automatically.

enter image description here

Show[{Plot[.75 x^2 - 2.42, {x, -.3, 1.7}], 
  Plot[-E^x + 3.24, {x, -.69, .42}], 
  Plot[.88 Sin[x - 3] + 1.18, {x, .35, 1.7}], 
  Plot[.45 Cos[x] - 2.8, {x, -2.4, -.278}], 
  Plot[.7 Tan[x - 2.4] + .2, {x, -.22, .37}], 
  Plot[.37 Cot[x] + 1.25, {x, -2.2, -.7}], 
  Plot[-Sqrt[.03 - (x - 1.16)^2] + 1.7, {x, -3, 3}], 
  Plot[Sqrt[.03 - (x - 1.16)^2] + 1.7, {x, -3, 3}], 
  Plot[-Sqrt[.0006 - (x - 1.22)^2] + 1.7, {x, -4, 4}], 
  Plot[Sqrt[.0006 - (x - 1.22)^2] + 1.7, {x, -4, 4}], 
  Plot[.2 Log[2 x - 3.9] + 1.8, {x, 1.97, 2.38}], 
  Plot[.23 Cos[x - 3] + 1.6, {x, 1.8, 3.06}], 
  Plot[1.02 Sqrt[x - .4] + 1.6, {x, 0, .78}], 
  Plot[.8 Sin[x + .3] + 1.52, {x, .76, 1.8}], 
  Plot[-.4 x + .5, {x, -.7, -.25}], Plot[-x - 3.9, {x, -5.15, -4.8}], 
  Plot[-.89 x - 3.3, {x, -4.58, -4.23}], 
  Plot[-.85 x - 3.03, {x, -3.99, -3.677}], 
  Plot[-.99 (x + .5) + -3.45, {x, -5.65, -5.3}], 
  Plot[5 (x + .43)^2 + .8, {x, -.81, -.5}], 
  Plot[15 (x + .91), {x, -.809, -.75}], 
  Plot[.7 Sin[x - 2.6] + 2, {x, -.766, .3}], 
  Plot[-Sqrt[2 - (x - 1.2)^2] + .5, {x, -.1, .99}], 
  Plot[Cot[x + .74] - .7, {x, 0, .7}], 
  Plot[17 E^(x - .8) - 3.1, {x, -2.3, -1.39}], 
  Plot[7 ArcCot[x + 3] - 5, {x, -1, -.44}], 
  Plot[-15 (x + .8)^2 - 1.14, {x, -1, -.6}], 
  Plot[-.7 Sqrt[x + 2] - .6, {x, -2, -1.3}], 
  Plot[-.5 Sqrt[x + 2.45] - .4, {x, -2.6, -2.3}], 
  Plot[-.8 Sqrt[x + 3], {x, -2.95, -2.75}], 
  Plot[(x + 2.6)^2 - .4, {x, -2.71, -2.17}], 
  Plot[1.1 (x + 3.03)^2 - .15, {x, -3.5, -2.79}], 
  Plot[2 (x + .5), {x, -.95, -.75}], Plot[2 (x + .6), {x, -1.1, -.8}],
   Plot[-(x + .36)^2, {x, -1.45, -.9}], 
  Plot[(x + 2.2)^2 - .6, {x, -2.308, -1.35}], 
  Plot[.8 Sqrt[.05 - (x + 2)] + 1, {x, -6.1, -2.29}], 
  Plot[.65 Sqrt[.05 - (x + 1.7)] + .8, {x, -5.9, -2.6}], 
  Plot[.6 Sqrt[.05 - (x + 1)] + .47, {x, -5.61, -2.5}], 
  Plot[Sqrt[.01 - (x - 1.17)^2] + 1.7, {x, 0, 5}], 
  Plot[-Sqrt[.01 - (x - 1.17)^2] + 1.7, {x, 0, 5}], 
  Plot[.01 x + .94, {x, -4.8, -2.31}], 
  Plot[-.057 x + 1, {x, -5.3, -2.5}], 
  Plot[-.8 Log[x + 2.8] + 1, {x, -2.25, -1}], 
  Plot[-.2 Log[x + 5.97] + 1.5, {x, -5.93, -5.65}], 
  Plot[-.4 Log[x + 2.7] + .5, {x, -2.646, -1.4}], 
  Plot[-(x + .2)^3 + 1.2, {x, -.773, .19}], 
  Plot[.7 x + 1.15, {x, -2.39, -1.5}], 
  Plot[.4 x + .9, {x, -2.896, -1.55}], 
  Plot[.3 Cos[x + .4] + .4, {x, -3.66, -1.671}], 
  Plot[.13 Cos[x + 1] + .59, {x, -4.19, -2.025}], 
  Plot[-.2 Tan[x + .34] - .8, {x, -1.085, -.3}], 
  Plot[.4 Cos[x + 1.7] + 2.7, {x, -6.1, -5.3}], 
  Plot[.5 Sin[x + 1.3] + 1.85, {x, -6.1, -5.39}], 
  Plot[9 (x + 6)^2 + 2.2, {x, -6.1, -6}], 
  Plot[ArcTan[x + 3.1] - 3.1, {x, -3.25, -2.34}], 
  Plot[x - .07, {x, -2.462, -2}], 
  Plot[.1 (x + 6)^2 - 4.1, {x, -3.2, -1.4}], 
  Plot[.15 (x + 4)^2 - 3.5, {x, -3, -2}], 
  Plot[-(x + .75)^2 + .8, {x, -1.5, -1.181}], 
  Plot[1.2 x + 1.3, {x, -1.826, -1}], 
  Plot[-(x + .55)^2 + 2.45, {x, -.75, .37}], 
  Plot[5 (x + .5)^2 + 2.5, {x, -.7, -.5}], 
  Plot[5 (x + 1.25)^2 - 2, {x, -1.4, -.98}], 
  Plot[ArcCot[x - 1.28] + 1.1, {x, 1.753, 2.2}], 
  Plot[.1 Cos[x - 3.1] + 1.87, {x, 2.192, 3.9}], 
  Plot[.03 (x - 2)^2 + 1.79, {x, 3.1, 3.9}], 
  Plot[5 (x - 1.5)^2, {x, 1.75, 1.98}], 
  Plot[-16 (x - 1.6)^2 + .4, {x, 1.668, 1.75}], 
  Plot[16 (x - 1.63)^2 - .3, {x, 1.7, 1.77}], 
  Plot[-.6 (x - 1.3)^2 + 1.4, {x, .25, .94}], 
  Plot[-.5 (x - 2)^2 + 1.66, {x, 1, 2.1}]},
 PlotRange -> All, AxesOrigin -> {0, 0}, AspectRatio -> Automatic]
POSTED BY: Vitaliy Kaurov
Posted 7 years ago

Add the option AspectRatio -> Automatic to Show, as in the attached.

Attachments:
POSTED BY: David Keith
Posted 7 years ago

Actually, I figured it out!

POSTED BY: Clarissa Hood
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract