V-REP教程(九) Paths

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/DanielDingshengli/article/details/89328414

Paths

在这里插入图片描述
生成Paths的三种方式
在这里插入图片描述
path是通过以.csv文件导入

Path edit mode

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
For precise positionning of control points, use the coordinates and transformation dialog. If you want to edit a control point’s orientation, make sure the path’s automatic orientation option is disabled (that option is enabled by default).
在这里插入图片描述
在这里插入图片描述
左上方Edit可以插入新的点然后调整

Edge edit mode

看图就能明白
在这里插入图片描述
在这里插入图片描述

Paths2

Path control points and Bezier points 控制点和贝塞尔点

看图就行
在这里插入图片描述
在这里插入图片描述
一般不需要调整

Path position and length calculation method 位置和长度计算方式

想象一个焊接机器人,其末端执行器是焊接设备的尖端;在两个连续的Bezier点之间,末端执行器可以:
在这里插入图片描述
移动&&旋转

此外,在某些情况下,我们希望焊炬遵循预先定义的路径,在固定点停止再继续。
在这里插入图片描述
在这里插入图片描述

应用

Movement along a Path

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
现在应该能明白了。

Path shaping 整形功能

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

导入导出路径

在这里插入图片描述
excel软件可以编辑
每行:
在这里插入图片描述
在这里插入图片描述

展开阅读全文

Pathological Paths

01-08

DescriptionnnProfessor Pathfinder is a distinguished authority on the structure of hyperlinks in the World Wide Web. For establishing his hypotheses, he has been developing software agents, which automatically traverse hyperlinks and analyze the structure of the Web. Today, he has gotten an intriguing idea to improve his software agents. However, he is very busy and requires help from good programmers. You are now being asked to be involved in his development team and nto create a small but critical software module of his new type of software agents. nUpon traversal of hyperlinks, Pathfinder's software agents incrementally generate a map of visited portions of the Web. So the agents should maintain the list of traversed hyperlinks and visited web pages. One problem in keeping track of such information is that two or more different URLs can point to the same web page. For instance, by typing any one of the following five URLs, your favorite browsers probably bring you to the same web page, which as you may have visited is the home page of the ACM ICPC Ehime contest. nhttp://www.ehime-u.ac.jp/ICPC/nnhttp://www.ehime-u.ac.jp/ICPCnnhttp://www.ehime-u.ac.jp/ICPC/../ICPC/nnhttp://www.ehime-u.ac.jp/ICPC/./nnhttp://www.ehime-u.ac.jp/ICPC/index.htmlnnYour program should reveal such aliases for Pathfinder's experiments. nWell, . . . but it were a real challenge and to be perfect you might have to embed rather complicated logic into your program. We are afraid that even excellent programmers like you could not complete it in five hours. So, we make the problem a little simpler and subtly unrealistic. You should focus on the path parts (i.e. /ICPC/, /ICPC, /ICPC/../ICPC/, /ICPC/./, and /ICPC/index.html in the above example) of URLs and ignore the scheme parts (e.g. http://), the server parts (e.g. www.ehime-u.ac.jp), and other optional parts. You should carefully read the rules described in the sequel since some of them may not be based on the reality of today's Web and URLs. nEach path part in this problem is an absolute pathname, which specifies a path from the root directory to some web page in a hierarchical (tree-shaped) directory structure. A pathname always starts with a slash (/), representing the root directory, followed by path segments delimited by a slash. For instance, /ICPC/index.html is a pathname with two path segments ICPC and index.html. nAll those path segments but the last should be directory names and the last one the name of an ordinary file where a web page is stored. However, we have one exceptional rule: an ordinary file name index.html at the end of a pathname may be omitted. For instance, a pathname /ICPC/index.html can be shortened to /ICPC/, if index.html is an existing ordinary file name. More precisely, if ICPC is the name of an existing directory just under the root and index.html nis the name of an existing ordinary file just under the /ICPC directory, /ICPC/index.html and /ICPC/ refer to the same web page. Furthermore, the last slash following the last path segment can also be omitted. That is, for instance, /ICPC/ can be further shortened to /ICPC. However, /index.html can only be abbreviated to / (a single slash). nYou should pay special attention to path segments consisting of a single period (.) or a double period (..), both of which are always regarded as directory names. The former represents the directory itself and the latter represents its parent directory. Therefore, if /ICPC/ refers to some web page, both /ICPC/./ and /ICPC/../ICPC/ refer to the same page. Also /ICPC2/../ICPC/ refers to the same page if ICPC2 is the name of an existing directory just under the root; notherwise it does not refer to any web page. Note that the root directory does not have any parent directory and thus such pathnames as /../ and /ICPC/../../index.html cannot point to any web page. nYour job in this problem is to write a program that checks whether two given pathnames refer to existing web pages and, if so, examines whether they are the same.nInputnnThe input consists of multiple datasets. The first line of each dataset contains two positive integers N and M, both of which are less than or equal to 100 and are separated by a single space character. nThe rest of the dataset consists of N + 2M lines, each of which contains a syntactically correct pathname of at most 100 characters. You may assume that each path segment enclosed by two slashes is of length at least one. In other words, two consecutive slashes cannot occur in any pathname. Each path segment does not include anything other than alphanumerical characters (i.e. `a'-`z', `A'-`Z', and `0'-`9') and periods (`.'). nThe first N pathnames enumerate all the web pages (ordinary files). Every existing directory name occurs at least once in these pathnames. You can assume that these pathnames do not include any path segments consisting solely of single or double periods and that the last path segments are ordinary file names. Therefore, you do not have to worry about special rules for index.html and single/double periods. You can also assume that no two of the N pathnames npoint to the same page. nEach of the following M pairs of pathnames is a question: do the two pathnames point to the same web page? These pathnames may include single or double periods and may be terminated by a slash. They may include names that do not correspond to existing directories or ordinary files. nTwo zeros in a line indicate the end of the input.nOutputnnFor each dataset, your program should output the M answers to the M questions, each in a separate line. Each answer should be "yes" if both point to the same web page, "not found" if at least one of the pathnames does not point to any one of the first N web pages listed in the input, or "no" otherwise.nSample Inputnn5 6n/home/ACM/index.htmln/ICPC/index.htmln/ICPC/general.htmln/ICPC/japanese/index.htmln/ICPC/secret/confidential/2005/index.htmln/home/ACM/n/home/ICPC/../ACM/n/ICPC/secret/n/ICPC/secret/index.htmln/ICPCn/ICPC/../ICPC/index.htmln/ICPCn/ICPC/general.htmln/ICPC/japanese/.././n/ICPC/japanese/./../n/home/ACM/index.htmln/home/ACM/index.html/n1 4n/index.html/index.htmln/n/index.html/index.htmln/index.htmln/index.html/index.htmln/..n/index.html/../..n/index.html/n/index.html/index.html/..n0 0nSample Outputnnnot foundnnot foundnyesnnonyesnnot foundnnot foundnyesnnot foundnnot found 问答

Downward paths

11-21

Problem Descriptionn================n  Hi! I am an ACMer from CSU. This contest made by me is to celebrate my girlfriend’s birthday although the problems in this contest do not relate to her in fact. :) Any way, happy birthday to you, honey!n  Thanks to LCY, I have this chance to share my ideas and works with you. Good luck and have fun!n================n  We have a graph with size = N like that in Figure 1. Then we are going to find a downward path from the top node to one bottom node.n  First, we select the top node as the beginning. Then at any node, we can go horizontally or downward along the blue edge and reach the next node. The finding will be end when we reach one of the bottom nodes. After that we can get a downward path from the top node to one bottom node. Note that we can not pass a blue edge that we have passed ago during each finding.n  Your task is to calculate there exists how many downward paths.nn ![](http://acm.hdu.edu.cn/data/images/C424-1001-1.jpg)nnInputn  There is an integer T (1 <= T <= 1000) in the first line, which indicates there are T test cases in total.n  For each test case, there is only one integer N (1 <= N <= 10^18) indicates the size of the graph.n nnOutputn  For each test case, you should output the correct answer of the above task in one line.n  Because the answer may be very large, you should just output the remainder of it divided by 1000003.n nnSample Inputn2n1n2n nnSample Outputn2n8 问答

Redundant Paths

10-18

DescriptionnnIn order to get from one of the F (1 <= F <= 5,000) grazing fields (which are numbered 1..F) to another field, Bessie and the rest of the herd are forced to cross near the Tree of Rotten Apples. The cows are now tired of often being forced to take a particular path and want to build some new paths so that they will always have a choice of at least two separate routes between any pair of fields. They currently have at least one route between each pair of fields and want to have at least two. Of course, they can only travel on Official Paths when they move from one field to another. nnGiven a description of the current set of R (F-1 <= R <= 10,000) paths that each connect exactly two different fields, determine the minimum number of new paths (each of which connects exactly two fields) that must be built so that there are at least two separate routes between any pair of fields. Routes are considered separate if they use none of the same paths, even if they visit the same intermediate field along the way. nnThere might already be more than one paths between the same pair of fields, and you may also build a new path that connects the same fields as some other path.nInputnnLine 1: Two space-separated integers: F and R nnLines 2..R+1: Each line contains two space-separated integers which are the fields at the endpoints of some path.nOutputnnLine 1: A single integer that is the number of new paths that must be built.nSample Inputnn7 7n1 2n2 3n3 4n2 5n4 5n5 6n5 7nSample Outputnn2nHintnnExplanation of the sample: nnOne visualization of the paths is: n 1 2 3n +---+---+ n | |n | |n 6 +---+---+ 4n / 5n / n / n 7 +nBuilding new paths from 1 to 6 and from 4 to 7 satisfies the conditions. n 1 2 3n +---+---+ n : | |n : | |n 6 +---+---+ 4n / 5 :n / :n / :n 7 + - - - - nCheck some of the routes: n1 – 2: 1 –> 2 and 1 –> 6 –> 5 –> 2 n1 – 4: 1 –> 2 –> 3 –> 4 and 1 –> 6 –> 5 –> 4 n3 – 7: 3 –> 4 –> 7 and 3 –> 2 –> 5 –> 7 nEvery pair of fields is, in fact, connected by two routes. nnIt's possible that adding some other path will also solve the problem (like one from 6 to 7). Adding two paths, however, is the minimum. 问答

没有更多推荐了,返回首页