AppInventor2|Robot Forum 机器人开发交流平台  
  
View: 10|Reply: 0

【Extensions】How to Use Three Dimensional Coordinates Motion

[Copy link]
  • TA的每日心情
    开心
    2017-11-13 19:19
  • 签到天数: 4 天

    [LV.2]偶尔看看I

    30

    Threads

    42

    Posts

    286

    Credits

    管理员

    Rank: 9Rank: 9Rank: 9

    Credits
    286
    Post time 2017-12-1 22:20:13 | Show all posts |Read mode
    Extension Descriptions
    It is a non-visible extensions for creating 3d system. You can create an abstract 3d coordinate system.

    It also supports move points or rotate points around a origin. You can draw a picture by lines, and you input all the vertexs into methor rotate by x. Then you use a timer to repeat that method and gain the converted points from method to draw pictures in new position.


    Notice: You must draw pictures yourself. It is a extensions that deal with 3d points and convert them into 2d points that can be appeared in Canvas that looks like a 3d motion.



    Method Descriptions

    1.[Create3DCoordinate]
    Create a three dimentional Coodinate System(non-visible)

    2. [revolveByXaxis] X1,Y1,Z1,direction
    Rotate a point by 0.1s by the X axis

    a point rotate by the origin X axis by 0.1s

    [X1]
    x dimention of the point you want to rotate
    [Y1]
    y dimention of the point you want to rotate
    [Z1]
    z dimention of the point you want to rotate
    [direction]
    0-clock direction
    1-counter clock direction


    3.[revolveByYaxis] X1,Y1,Z1,direction
    Rotate a point by 0.1s by the Y axis
    [X1]
    x dimention of the point you want to rotate
    [Y1]
    y dimention of the point you want to rotate
    [Z1]
    z dimention of the point you want to rotate
    [direction]
    0-clock direction
    1-counter clock direction



    4. leftward(int distance)
    move a 3d point leftward for a distance


    5.rightward(int distance)
    move a 3d point rightward for a distance


    6.upward(int distance)
    move a 3d point upward for a distance


    7.downward(int distance)
    move a 3d point downward for a distance


    8.forward(int distance)
    move a 3d point forward for a distance


    9.backward(int distance)
    move a 3d point backward for a distance




    Receive Coodinate of the converted coordinate.







    By Wei Qiang. This is my original work. Feel free to forward this post but note my name and my website. All Rights Reserved.
    觉得不错?打赏下吧,1元不嫌少,10元不嫌多!

    This post contains more resources

    You have to Login for download or view attachment(s). No Account? Register

    x
    Reply

    Use magic Report

    You have to log in before you can reply Login | 立即注册

    Points Rules

    Quick Reply To Top Return to the list