# How to shear a ellipse

I am working on a scientiic illustration and I need your help. :)

I want to make an ellipse with left end at (0, 0 , 0) and the right end at (1, 1, 1) where the middle point is at (0.5, 0.5, 0.5). All I have to do is to shear the ellipse shown in the figure in such a way that right end should be at (1,1,1) and the middle point at (0.5, 0.5, 0.5) and left end remain at zero.

How to shear it....?

I tried propotional editing by moving the right end vertice point but it gives non symmetrical ellipse.

• have you tried the Shear tool (ctrl alt shift S), doesn't it give a good result? also, Mesh Deform modifier could help you Commented Nov 16, 2018 at 11:00

Here are two ways to do it: Shear tool or Mesh Deform modifier

Matrices and Scripting

Since it is for a "scientific visualization" I thought some maths and scripting wouldn't go astray.

Matrix.Shear(plane, size, factor)

For the example here the plane chosen is XY, The normal of the XY plane is the Z axis. For this case, consider the two values of factor as the x and y component that make up the 2D shearing vector. (1, 1) (Top ortho view)

The unit diameter sphere is sitting on its base, the z axis passes thru both poles. The Each ring of latitude has been "sheared" maintaining a constant z value from (0, 0, 1) to (1, 1, h) Where h = 1 is the "height" (diameter) of the sphere.

Before and after shear

Test script. Adds a UV sphere at origin. Scales mesh to diameter one, and translates such that origin is on south pole.

Applies the XY plane shearing matrix along 1, 1.

import bpy
from mathutils import Matrix

# Add a diameter one sphere sitting on its base.

context = bpy.context
ob = context.object
me = ob.data
T = Matrix.Translation((0, 0, 1))

Sc = 0.5 * Matrix.Identity(4)
me.transform(T * Sc)

#  Shearing

Sh = Matrix.Shear('XY', 4, (1, 1))

me.transform(Sh)


Oops on re reading question see you wanted origin at (0.5, 0.5, 0.5), wont apply transform to me, will leave at origin and translate object.

Sh = Matrix.Shear('XY', 4, (1, 1))
Sc = 0.5 * Matrix.Identity(4)
me.transform(Sh * Sc)

ob.matrix_world.translation = (0.5, 0.5, 0.5)


Press SPACE type in "shear", click the search result and shear. Next time just use the hotkey given next to it.

• wooohooo. It worked. Thankyou so much. It is exactly what I wanted. :) Commented Nov 16, 2018 at 11:54