• 0

# How does one convert between a TopShear value and the angle of the sloped verticals.

Please take a moment to consider if this thread is worth bumping.

## Question

Using Top Sheer changes the angles of the verticals in a box prim from 90 degrees to a varying slope.

What formula converts a top sheer to an angle, or the reverse?

## Recommended Posts

• 0

If there's a reliable formula, I have never found it.  I do things like that empirically when I need to.  If you are writing a script that needs to control it, make up a dummy of your model and change its top shear through a range of values.  Record the angles and use them to write yourself a function that works, and hope that it's linear. (It should be.) The problem is that the angle is not simply a function of top shear.  It also depends on the relative lengths of the prim's main X, Y, Z axes.  To get a really acute angle, you need to manipulate not only top shear but also get the Z axis much shorter than the others.

• 1
##### Share on other sites

• 0

Afraid I can't pull up the notation, but I'm pretty sure it's going to be a function of the base-width (or depth), since that'll change the height angle. My trig is lousy.

The way Top Shear is calculated (from 0.0 - 1.0) appears to be something like this (below), where it's basically a percentage shift from the base position. I don't think it's calculated to produce sloped angles, though I'm sure a relationship would exist.

﻿

• 1
##### Share on other sites

• 0

I just fiddle with it empirically, just like Rolig!

• 1
##### Share on other sites

• 0

For the angle at the base:

tan=(w*T)/z

For the angle at the top:

tan=z/(w*T)

w is the dimension along the shear axis (x width if it's x shear and y width if it y shear)

T is the shear ratio

z is the dimension along the z axis

Edit: Just like Rolig and Lindal, I can't remember I've ever actually calculated it either. I use trial-and-error and sometimes MouseDragon to get the correct angles.

Edit 2:

To convert tangent to degrees or radians:

http://www.rapidtables.com/calc/math/Tan_Calculator.htm#inv_calculator

• 1