当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2980:Rotating a Frame

题目描述
Suppose you have an ice hockey ball (Which has the shape of a cylinder as shown in the figure) and a photo frame (a rectangle). You place the ball in one corner of the photo frame and keep the balls position and orientation fixed. Now you start rotating the frame in clockwise direction. But as the sides of the frame and of the ball have high friction so while the frame is rotating its surface and the balls surface never slips. So the frame always has a constant angular velocity as well as a tangential velocity as shown in the figure below.



Write a program to find the position of the frame after certain time.
输入解释
he input contains several test cases. Each set of input is contained in two lines. The first line of a set contains eight integers which denote the values x1, y1, x2, y2, x3, y3 and x4, y4 respectively. These values indicate that the four vertices of the frame in clockwise order are denoted by the Cartesian coordinates P1 (x1, y1) , P2 (x2, y2) , P3 (x3, y3) and P4 (x4, y4) . You can assume that 0<=| x1|,| y1|,| x2|,| y2|,| x3|,| y3|,| x4|,| y4|<=1000 . The second line contains three floating point numbers which denotes the values of R (0 < R < 1000) , T (0<=T < 100000) and (0<= < 360) respectively. Here R is the radius of the ice hockey ball, T denotes that we want to know the position of the frame after T seconds and is the angular velocity of the frame in degree/second. You can assume that ball is placed touching two the si! des that intersect at point (x1, y1) and it never moves from or rotates in that position. There will be no such input where the hockey ball cannot be placed within the frame. The last test case is followed by a single zero, which should not be processed.
输出解释
For each test case, print the case number and eight floating point numbers x1f, y1f, x2f, y2f, x3f, y3f, x4f and y4f , to three decimal places. These floating-point numbers actually denote the final positions of the points (x1, y1),(x2, y2),(x3, y3) and (x4, y4) (The four corners of the frame) respectively after time T seconds.
输入样例
0 1 1 1 1 0 0 0 
0.2 10 0 
0 1 1 1 1 0 0 0 
0.2 10 100
0
输出样例
Case 1: 0.000 1.000 1.000 1.000 1.000 0.000 0.000 0.000 
Case 2: -0.619 0.132 -0.445 1.117 0.539 0.943 0.366 -0.042
来自杭电HDUOJ的附加信息
Recommend gaojie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-2980

最后修改于 2020-10-25T22:58:52+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)