0
$\begingroup$

enter image description here

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....?

enter image description here

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

$\endgroup$
1
  • $\begingroup$ have you tried the Shear tool (ctrl alt shift S), doesn't it give a good result? also, Mesh Deform modifier could help you $\endgroup$ – moonboots Nov 16 '18 at 11:00
3
$\begingroup$

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

enter image description here

$\endgroup$
1
$\begingroup$

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.

enter image description here 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
bpy.ops.mesh.primitive_uv_sphere_add(location=(0, 0, 0))
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)

enter image description here

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)
$\endgroup$
0
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ wooohooo. It worked. Thankyou so much. It is exactly what I wanted. :) $\endgroup$ – Rafeeque Bin Usman Nov 16 '18 at 11:54

Your Answer

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

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