English 中文(简体)
如何轮换一只轴心的ube——MATLAB
原标题:How to rotate a cube about an axis - MATLAB

我正派人参加我的课程,我需要轮用一只特定轴心的ube。 我不能使用MATLAB的功能,因此我需要人工操作。

This is my attempt that is to no avail. `

function [ CV ] = rotateCubeX( CV, degrees )
    %CV = input vertices/Return val
    %degrees = amount of degrees to rotate
    alpha = degrees * pi/180;
    rotate = zeros(3,3);
    rotate(1,1) = 1;
    rotate(2,2) = cos(alpha);
    rotate(2,3) = -sin(alpha);
    rotate(3,2) = sin(alpha);
    rotate(3,3) = cos(alpha);
    CV = CV * rotate;
    end

此前:

25.2000 5.9000 2.5000 
25.7000 5.9000 2.5000 
25.7000 7.9000 2.5000 
25.2000 7.9000 2.5000 
25.2000 5.9000 2.8000 
25.7000 5.9000 2.8000 
25.7000 7.9000 2.8000 
25.2000 7.9000 2.8000 

之后:

-10.3544 -23.7200 2.5000 
-10.6536 -24.1205 2.5000 
-9.0513 -25.3175 2.5000 
-8.7521 -24.9169 2.5000 
-10.3544 -23.7200 2.8000 
-10.6536 -24.1205 2.8000 
-9.0513 -25.3175 2.8000 
-8.7521 -24.9169 2.8000 

图像没有变化。

我确信,我正在sil笑。

最佳回答

你们期望轮换的轴心是什么? 你在你的法典中如何说明这一点?

如果你试图轮流使用任意轴心,那么关于任意轴心的轮任总公式是nofollow>here。 (根据其他办法设计一个名册。) 注意信道,以及你是否使用浏览器或主轴一栏!

问题回答

暂无回答




相关问题
Bounding ellipse

I have been given an assignement for a graphics module, one part of which is to calculate the minimum bounding ellipse of a set of arbitrary shapes. The ellipse doesn t have to be axis aligned. This ...

Line segment in a triangle

How can we check if a line segment falls partially or fully inside a triangle? Cheers.

Line Segments from a point

I have a point p, and 2 line segments in a 2D plane. Point p is a location of view from where camera is looking towards the line segments. I want to check if line segment 1 is partially or fully ...

Creating a surface of triangles from a set of 2D points

I have a set of points and I need to convert the set to (non-overlapping) triangles (or a big polygon if equivalent)... The application: I have a list of locations (latitude,longitude) from a country,...

Radial plotting algorithm

I have to write an algorithm in AS3.0 that plots the location of points radially. I d like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry ...

Delete holes in a Polygon

I have a polygon determined by an Array of Points. This polygon is crossing itself making some holes in the polygon itself. My questions is: How can I omit this holes and just get the exterior ...

Finding cycle of 3 nodes ( or triangles) in a graph

I am working with complex networks. I want to find group of nodes which forms a cycle of 3 nodes (or triangles) in a given graph. As my graph contains about million edges, using a simple iterative ...

热门标签