Help Needed: Add Axis, Draw Arm Pieces, Rotate Objects

  • Context: MATLAB 
  • Thread starter Thread starter student012
  • Start date Start date
  • Tags Tags
    Arm Axis Rotate
Click For Summary

Discussion Overview

The discussion revolves around a homework problem involving the addition of an axis to a rectangle, drawing arm pieces, and rotating objects in a programming context, likely related to graphical representation or simulation.

Discussion Character

  • Homework-related
  • Technical explanation

Main Points Raised

  • The original poster requests assistance with adding an axis to a rectangle and drawing two pieces of an arm.
  • The poster specifies the need to rotate the first part of the arm by 20 degrees about the first axis and then rotate the second part by -30 degrees about the second axis.
  • Some participants express confusion regarding the clarity of the instructions provided by the original poster.
  • One participant questions whether the task is homework, indicating a lack of context for understanding the problem.

Areas of Agreement / Disagreement

Participants do not reach a consensus, as there is confusion about the clarity of the instructions and the nature of the task, with some participants questioning the context of the problem.

Contextual Notes

The original poster's code snippet lacks sufficient explanation of the intended outcome, and the specific requirements for the rotations and drawings are not fully detailed.

student012
Messages
2
Reaction score
0
LEASE HELP!

-Add an axis to current rectangle
-Draw both piece of arm
-rotate object first axis 20 degree
--redraw.
-then, rotate 2nd part about 2nd axis to -30degree

my current code for rectangle is
%RECTANGLE('Position', [x y w h])
w=4.5;

%width
h=.5;

%height
x=1.75;y=2.75;

%corner position
xv=[x x+w x+w x x];yv=[y y y+h y+h y];
p1=patch(xv,yv,[0 0 0]);

% original rectangle
T=[-2 -2 -2 -2 -2;-3 -3 -3 -3 -3];
axis equal;
grid on;


R(1,:)=xv;R(2,:)=yv;
p=R+T;

%Translation
alpha=pi/9;
XY=[cos(alpha) -sin(alpha);sin(alpha) cos(alpha)]*p;
Y=patch(p(1,:),p(2,:),'k');
F=patch(XY(1,:),XY(2,:),'k');
T3=[2 2 2 2 2;3 3 3 3 3];
B=XY+T3
y=patch(B(1,:),B(2,:),'k');
 
Physics news on Phys.org
your instructions are vague, is this homework?
 
yes, its my homeowrk..
Tht's the instruction from my teacher.
 
I have no context, so I don't really understand what you're trying to do or what your problem is.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
6
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K