• Global community
• Language:
• Deutsch
• English
• Español
• Français
• Português
• 日本語コミュニティ
Dedicated community for Japanese speakers
• 한국 커뮤니티
Dedicated community for Korean speakers
• Shear and rotation

# Shear and rotation

Explorer ,
Apr 16, 2022 Apr 16, 2022

Copied

Hi alll, I’m facing an issue while retrieving the value of rotation angle and shear angle which is applied to the image.

///////////////////retrieving rotation angle//////////////////////////

var matrix = graphicFrame.matrix; var angle = Math.atan2(matrix.mValueB, matrix.mValueA); var rotation_angle = angle / Math.PI * 180;

/////////////////retrieving shear angle////////////////////////

var shearAngle = 180 / Math.PI * Math.atan2(matrix.mValueC, matrix.mValueD);

The above script will work properly only if the image has applied either rotation or shear angle.if the image has applied both rotation and shear angle in this time the above script will give wrong value. can anyone please help me to get the solution. I want to retrieve the value of shear and rotation angle using script.

TOPICS
Scripting

Views

211

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
3 Replies 3
Explorer ,
Apr 17, 2022 Apr 17, 2022

Copied

Anyone please help me to get the solution. I'm facing an issue while retrieving rotation and shear angle of the image.

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Guide ,
Apr 18, 2022 Apr 18, 2022

Copied

Combined transformations are beyond my knowledge of linear algebra.  You could try asking on https://math.stackexchange.com/

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Engaged ,
Apr 18, 2022 Apr 18, 2022

Copied

LATEST

Assuming that shear is to be calculated as whatever is left after deducting “rotation from horizontal” (the result of the first equation), you’ll want to start with the difference between mValueB and mValueC. So your second equation is already wrong. Beyond that, as I said first time around, you’re talking math. Folks here are typically working artists whose high-school math, if they ever had much, is probably shot. As @femkeblanco says, go ask a geometer instead.

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Resources
Learning Resources for Illustrator
Crash on launch and known issues
Fonts and Typography in Illustrator