2

I'm trying to make an isometric version of this

enter image description here

The bulges and the dips aren't too hard themselves, however I'm struggling to find a way of warping the isometric grid lines in the right way

enter image description here

enter image description here

Does anyone have any suggestions?

2
  • 1
    The example image is already isometric, just under a different angle. Is it not possible to access the software that was made in, and recreate the image in that angle?
    – Vincent
    Oct 13, 2016 at 8:55
  • 1
    Is there a reason that you are trying to create this in Illustrator? It's certainly possible, but a 3D package or a specialist graph drawing package would be much better suited to the task.
    – Westside
    Oct 13, 2016 at 10:06

1 Answer 1

9

We can approach this problem in many ways.

Using a plotting app

First approach is to get hold of the original data and turn the rotation to isometric, i would use this approach. The original image is probably done in matlab (and I prefer not deal with it). But I prefer Mathematica as it makes better graphs in my oppinion, and is in this case nicer overall.

The function plotted is most likely x e-(x2 + y2). so lets plot that. With a help of bit of googling here for isometricView we get (I scaled axes flipped data etc):

foo = Plot3D[-2*x Exp[-(-x)^2 - y^2], 
   {x, -2, 2}, {y, -2, 2}, 
   PlotRange -> Full,
   ColorFunction -> "Rainbow",
   Boxed -> False, Axes -> False,
   PlotPoints -> 30,
   Mesh -> 10];
Show[foo, ViewMatrix -> isometricView[foo, {1, 1, 1}, {0, 0, 1}]]

You can then save that out as a PDF that can be opened in illustrator or just output a png file. This results in:

enter image description here

Image 1: Replot of image.

With a few more lines you can make the result fully vector, if you like. Consult Mathematica.SE.

You can use python with scipy for the same result easy enough (yes even vector output for lines is possible again some work, not much more than 20 minutes of googling), as well as matlab with a bit more work and so on.

Plotting in illustrator

Ok so we can plot in illustrator using a free plotting script by joojaa (yes, me) called jooGraphFunction found here. The hint for isometric plot can be found in the documentation.

Plot the parametric function:

 x: 100*(+0.86605*0-0.86605*(t/100.))
 y: 100*(-0.5*0-0.5*(t/100.)-(t/100.)*exp(-(t/100.)*(t/100.)- (0*0)))
 Range -200 to 200 at step of 20

and you get:

enter image description here

Image 2: One line drawn

Repeat the plot by changing 0 to 0.5 then 1, 1.5, 2, -0.5, -1, -1.5 and -2

enter image description here

Image 3: One direction done

So we need to draw the curves in oppsite direction the formula changes to:

x: 100*(+0.86605*(t/100.)-0.86605*(0))
y: 100*(-0.5*(t/100.)-0.5*-0 - 0*exp(-(t/100.)*(t/100.)- (0*0)))

again change to 0.5 then 1, 1.5, 2, -0.5, -1, -1.5 and -2

enter image description here

Image 4: Second direction done. (Note to self add a array option to GUI).

OK so this is a a bit tedious, but obviously works. So we would be better of re-implementing part of the script so it loops over the data in question. Fortunately the script is modular just copy the last part over to a new script file and hack:

#target illustrator

// jooGraphFunctionLoopPlane.jsx  v0.9b modified for looping
//


for(var i=-2.0;i <= 2.0; i += 0.2 ){
     plotSmooth( -200, 20, 200, 0.01, PlotYfunc(i));
     plotSmooth( -200, 20, 200, 0.01, PlotXfunc(i));
}



function PlotYfunc(y) {
    return function(t){
    return new Array( 
        100*(+0.86605*(t/100.)-0.86605*y),
        100*(-0.5*(t/100.)-0.5*y - y*Math.exp(-(t/100.)*(t/100.)- (y*y))) );
    }

}

function PlotXfunc(x) {
    return function(t){
    return new Array( 
        100*(+0.86605*x-0.86605*(t/100.)),
        100*(-0.5*x-0.5*(t/100.) - (t/100.)*Math.exp(-(t/100.)*(t/100.)- (x*x))) );
    }

}

// this is a  very dirty and naive estimation 
function plotSmooth(start, step, end, delta, func){
    var doc = app.activeDocument;
    var path = doc.pathItems.add();

    var index = 0;

    for (var t = start;  t <= end + delta; t += step) {
        var point = path.pathPoints.add();

        now =  func(t);

        third = step / (3 * 2 * delta);

        t1 = func(t + delta);
        t2 = func(t - delta);


        tan1 = new Array(now[0]+(t2[0] - t1[0]) * third, now[1]+(t2[1] - t1[1]) * third)
        tan2 = new Array(now[0]-(t2[0] - t1[0]) * third, now[1]-(t2[1] - t1[1]) * third)        

        point.anchor = now;
        point.leftDirection = tan1;
        point.rightDirection = tan2;
    }
    return path;
}

Which is not particularly elegant but works. Now we can just adjust the for loop to have any number of grid items easily so doing a denser grid is no more work than any other grid:

enter image description here

Image 5: Generated grids, just change to loop structure

5
  • What website can you use to export the function as a PDF?
    – Ralt
    Oct 13, 2016 at 11:53
  • @Ralt I am not here to do the work for you I am here to teach how to do it. You as a matter of fact can very likely not afford my hourly rates. Just like martial arts, you can get the teachings for quite reasonable price but to hire a artist for your show is quite expensive.
    – joojaa
    Oct 13, 2016 at 11:56
  • You should never jump to such assumptions!
    – Ralt
    Oct 13, 2016 at 12:05
  • @Ralt i added a script that can generate the thing in one go, enjoy
    – joojaa
    Oct 13, 2016 at 13:06
  • Thanks, this is great! I'm familiar with code, but not maths. Currently trying to figure out how to alter the equation to have more exponential peaks and troth's
    – Ralt
    Oct 13, 2016 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.