1 00:00:05,670 --> 00:00:06,310 Here even. 2 00:00:06,870 --> 00:00:08,600 I hope you enjoyed creating the robot. 3 00:00:08,930 --> 00:00:12,690 So until now what we have done is all based on static objects. 4 00:00:12,690 --> 00:00:18,470 We have created the objects that doesn't move that remain a deposition and Wendy doing is completed. 5 00:00:18,460 --> 00:00:21,250 They just like that as their robots. 6 00:00:21,360 --> 00:00:24,510 But from now we will begin with some motions. 7 00:00:24,510 --> 00:00:31,320 First we will do define motion in which we just defined this one and the data will be created according 8 00:00:31,320 --> 00:00:32,250 to data. 9 00:00:32,330 --> 00:00:39,960 Say I have first example this on colliders fight or be white and Asian done this one but this is a literal 10 00:00:40,990 --> 00:00:44,240 three toed colitis spite and hatred. 11 00:00:44,610 --> 00:00:46,940 And I will get something like this one. 12 00:00:47,640 --> 00:00:48,570 So here. 13 00:00:48,570 --> 00:00:49,360 One by one. 14 00:00:49,360 --> 00:00:57,270 Rings are created with different their radius is against it diameter and with different colors. 15 00:00:57,270 --> 00:00:58,410 One by one. 16 00:00:58,410 --> 00:01:04,590 And if you notice this one that also changing the actual center position for the center is there. 17 00:01:04,590 --> 00:01:13,350 And it has now reached there which is nearly out of the first main circle and it will make guttering 18 00:01:13,350 --> 00:01:15,790 like this one and continue to be like this. 19 00:01:16,410 --> 00:01:19,760 So this is the first example of our movable object. 20 00:01:19,770 --> 00:01:24,170 And this is also actually like a truly objective and created a dead one. 21 00:01:24,240 --> 00:01:26,570 Once it gets there it will look like a 2D object. 22 00:01:27,330 --> 00:01:34,890 So if you are comfortable with creating this one then you can create this one by just posing the video. 23 00:01:35,020 --> 00:01:39,480 And if you are not then follow the video with me and try to create Dedmon. 24 00:01:40,030 --> 00:01:45,460 So now if you notice this one then it's a little harder to tell that whether this one is about or this 25 00:01:45,460 --> 00:01:46,890 one is about. 26 00:01:46,940 --> 00:01:55,420 So whenever you notice any of dating and you can tell which is about data so let's begin with this one. 27 00:01:55,500 --> 00:01:58,170 2 How to create that one because this one is not going to stop. 28 00:02:00,290 --> 00:02:03,400 Now first we look at the terminal. 29 00:02:03,590 --> 00:02:06,900 We will begin by just importing total. 30 00:02:06,950 --> 00:02:16,020 This time I'm not prepping the terminal and imposed this one as we the temperature so there we go with 31 00:02:16,020 --> 00:02:17,800 that one after that one. 32 00:02:17,860 --> 00:02:20,230 You remember that how we can create a circle. 33 00:02:20,350 --> 00:02:24,980 We just simply do the DOT circle. 34 00:02:25,130 --> 00:02:29,610 We had the sun and in that circle pass the radius. 35 00:02:29,620 --> 00:02:36,400 We have 5 and if you do that 1 you will get a circle like that one which is stopped. 36 00:02:36,400 --> 00:02:49,430 So let me also import time as D so that will not stop there and B I'm no sleep safe or 2 seconds for 37 00:02:49,430 --> 00:02:56,180 now and hide the totally lost. 38 00:02:57,240 --> 00:03:04,590 So when I did this one I will do the attitude circle model. 39 00:03:04,670 --> 00:03:08,610 So I wouldn't put it both at the same name B so time. 40 00:03:08,620 --> 00:03:14,900 D I also B I run that one day we go with a circle. 41 00:03:15,680 --> 00:03:18,090 So that's how you can create a circle. 42 00:03:18,170 --> 00:03:21,500 Now in that when you have noticed we have a large number of circle. 43 00:03:21,500 --> 00:03:27,420 So what I'm going to do I'm going to define the function with the name circle. 44 00:03:28,220 --> 00:03:36,200 So here we have this on circle and then positive parameters which I'm not taking anything right now. 45 00:03:36,630 --> 00:03:39,910 What I will do there I will first or bend color. 46 00:03:42,270 --> 00:03:49,750 And that will be say I'm taking credit for an example and then create a circle here. 47 00:03:49,750 --> 00:03:55,900 I'm not taking the pen up and down inside the function because that's what I just required once because 48 00:03:55,900 --> 00:03:57,720 the loop will never stop. 49 00:03:57,730 --> 00:04:00,170 After that one size say this time. 50 00:04:00,220 --> 00:04:08,650 Then after that one day we had this one just so I'm going to draw this one call this one here. 51 00:04:08,650 --> 00:04:21,140 Circle and run this one here you will get our red color circle with radius then so that so we can have 52 00:04:21,170 --> 00:04:22,740 a function here. 53 00:04:22,760 --> 00:04:27,050 Now if we remember our main Kaleido spiral then what. 54 00:04:27,050 --> 00:04:33,680 In that one is circles with different colors and with different sizes and that are moving forward wildly 55 00:04:33,860 --> 00:04:36,050 with a particular distance. 56 00:04:36,080 --> 00:04:37,830 So how I achieve that. 57 00:04:38,810 --> 00:04:45,920 So first of all few basic things I need to add first I change the background color to black because 58 00:04:45,920 --> 00:04:46,910 we have black in that one 59 00:04:49,820 --> 00:04:58,560 maybe go with like and then we will set speed to save fast so maybe I have not mentioned this one. 60 00:04:58,560 --> 00:05:03,190 You can also use slow fast fastest slowest time instead of numbers. 61 00:05:03,190 --> 00:05:11,770 If you've been or defined the actual speed then Ben sighs a little tickle this time too full and then 62 00:05:11,770 --> 00:05:13,310 we have the circle. 63 00:05:13,360 --> 00:05:16,210 Now what will we change here. 64 00:05:16,210 --> 00:05:24,520 First I will try to move my circle a little so please don't write with a particular save value faith 65 00:05:25,210 --> 00:05:27,750 but one thing when I create this circle. 66 00:05:28,790 --> 00:05:31,250 Then that will be created only once. 67 00:05:31,250 --> 00:05:35,380 So how I can move my circle next point. 68 00:05:35,840 --> 00:05:40,840 So here we will use a concept known as recursion legal action. 69 00:05:41,080 --> 00:05:45,560 That's something if you are out of belonging from computer science then you are already familiar with 70 00:05:45,560 --> 00:05:47,620 determine what that actually means. 71 00:05:47,680 --> 00:05:51,180 IDS that's is very simple and basic concept. 72 00:05:51,340 --> 00:05:56,390 It means calling a function inside a function and that means first. 73 00:05:56,390 --> 00:06:03,020 If I have created a circle by using a function then in the end of that particular function I will again 74 00:06:03,020 --> 00:06:08,700 call that function that is serves God same function here. 75 00:06:08,870 --> 00:06:11,860 Then it will again draw a circle. 76 00:06:11,970 --> 00:06:19,280 Let me show that one if I just do this one and run that one there. 77 00:06:19,280 --> 00:06:25,010 This circle is created again and again it will never stop because I'm calling this circle again and 78 00:06:25,010 --> 00:06:26,080 again inside that one. 79 00:06:26,390 --> 00:06:36,050 And if I add this command here and now let me first cancel that one because it will continue to run. 80 00:06:36,560 --> 00:06:42,320 And when I run this one I have this circle again and again. 81 00:06:42,870 --> 00:06:47,510 But there is actually a little shift on that front right now. 82 00:06:47,540 --> 00:06:50,510 If you have noticed this is no longer a circle. 83 00:06:50,510 --> 00:06:55,670 It is actually moving a little difference in forward direction and then again creating a circle. 84 00:06:55,670 --> 00:07:00,860 Or we can say the edge is moving and it now looks like a beach right now. 85 00:07:02,390 --> 00:07:04,040 And then it begins to hurt them. 86 00:07:04,250 --> 00:07:05,360 So that's all you can. 87 00:07:05,360 --> 00:07:08,510 Again and again call the function inside of that man. 88 00:07:08,600 --> 00:07:14,770 So it will look like it's actually moving and that's how you can have a particular right there. 89 00:07:14,960 --> 00:07:16,550 So that it will move a little there. 90 00:07:18,350 --> 00:07:22,630 Now after that one he had these two things. 91 00:07:22,650 --> 00:07:31,900 What I'm going to do with these I'm letting these two user so I will just provide this one as an angle. 92 00:07:32,150 --> 00:07:43,610 This one the circle with a radius say size and the color see color video and pass here. 93 00:07:44,820 --> 00:07:46,740 The color. 94 00:07:47,260 --> 00:07:59,110 Then we had this size and then we had the angle labial and here I will provide these things save red. 95 00:07:59,220 --> 00:08:07,250 After that we have sized say this time one deep and say shift B 40. 96 00:08:07,260 --> 00:08:09,110 Let's see what will happen this time. 97 00:08:09,270 --> 00:08:16,280 Then you run that one you will get this one but nothing after that because the size will be very large. 98 00:08:16,350 --> 00:08:23,930 Now fewer things that we need to change here is first thing you also need to pass these deal. 99 00:08:24,240 --> 00:08:27,110 Maybe that's why it actually doesn't work. 100 00:08:27,130 --> 00:08:28,400 Let me try this one right now. 101 00:08:30,670 --> 00:08:33,720 Because the pyramids are not bustier they will be determined. 102 00:08:34,330 --> 00:08:37,930 So the actual output I'm looking for. 103 00:08:37,930 --> 00:08:39,320 So what's happening actually there. 104 00:08:39,490 --> 00:08:44,050 It's again calling the function with the same parameters in the last we do not have past barometers 105 00:08:44,050 --> 00:08:44,260 here. 106 00:08:44,290 --> 00:08:45,700 So that actually stopped. 107 00:08:46,060 --> 00:08:48,720 And this time we are getting a very beautiful flower here. 108 00:08:48,740 --> 00:08:49,560 Where do we. 109 00:08:49,660 --> 00:08:53,380 A little large size for this one. 110 00:08:53,380 --> 00:08:59,930 Now this is only red color but other colliders spiral is actually in different colors. 111 00:09:00,010 --> 00:09:02,740 So the colors are changing at that point. 112 00:09:02,740 --> 00:09:06,020 So how we can change the colors for them. 113 00:09:06,190 --> 00:09:09,800 One option is to change the colors by just inputting. 114 00:09:10,060 --> 00:09:13,540 Second option here is by using a cycle. 115 00:09:13,540 --> 00:09:16,250 That's something I have already search for. 116 00:09:16,430 --> 00:09:17,790 I am taking a variable here. 117 00:09:17,810 --> 00:09:22,490 Colors and that will be lost I am just passing a cycle here. 118 00:09:22,600 --> 00:09:28,480 I will tell you what that is next actually going to be a list containing different colors see red red 119 00:09:29,560 --> 00:09:45,600 blue green yellow orange a gray feel more if you want to add like much like purple 120 00:09:49,400 --> 00:09:50,260 being. 121 00:09:51,170 --> 00:09:53,120 And whatever the color you'd need there. 122 00:09:53,150 --> 00:09:53,650 You can. 123 00:09:54,110 --> 00:10:01,250 So this is now actually a cycle and how a cycle works is it will take one by one. 124 00:10:01,250 --> 00:10:03,110 Again the values from this list. 125 00:10:03,110 --> 00:10:07,940 So this is a concept we had not learned yet but that's actually how it works. 126 00:10:07,940 --> 00:10:14,960 And here this is actually a matter cycle method and this method is not by default in the main so we 127 00:10:14,960 --> 00:10:22,060 have to but the actually libraries by default we have to import that library and that is in it really 128 00:10:22,060 --> 00:10:23,640 does. 129 00:10:23,660 --> 00:10:29,000 So what I'm going to do here from it are tools. 130 00:10:29,450 --> 00:10:34,080 Import cycle David Goldman. 131 00:10:34,090 --> 00:10:36,000 So now I have imported this cycle. 132 00:10:37,610 --> 00:10:39,410 And in color. 133 00:10:39,770 --> 00:10:40,510 What will I do. 134 00:10:40,520 --> 00:10:42,430 I will just write next. 135 00:10:42,440 --> 00:10:43,380 Of the cycle. 136 00:10:44,090 --> 00:10:45,730 So next of colors. 137 00:10:46,550 --> 00:10:56,040 So in this way it will change the values one by one with that one now save that one and increase the 138 00:10:56,040 --> 00:11:03,100 size to 50 this time so that we can notice that one much better it is actually. 139 00:11:03,100 --> 00:11:05,760 Again and again learning. 140 00:11:05,970 --> 00:11:13,290 Now we're on that planet in Lady go red blue green. 141 00:11:13,300 --> 00:11:21,400 And if you notice this is actually our list pattern red blue green yellow orange gray purple pink and 142 00:11:21,400 --> 00:11:28,250 there again this one that is the flower created and the colors are changing about one and under. 143 00:11:30,010 --> 00:11:35,280 So now that is actually Frost red and you can notice this one. 144 00:11:35,440 --> 00:11:42,410 And if you provide this one the same color only one color then it will now look like a flower but not 145 00:11:42,410 --> 00:11:43,010 the flower. 146 00:11:43,010 --> 00:11:50,510 Let me move to other nest modifications after this one of our next modifications is if you have noticed 147 00:11:50,550 --> 00:11:52,630 a first circle is very small. 148 00:11:53,360 --> 00:11:55,320 Then the second circle is a little larger. 149 00:11:55,340 --> 00:11:57,610 And then again and again they are getting larger. 150 00:11:58,010 --> 00:12:00,520 So how can I solve that problem. 151 00:12:00,540 --> 00:12:07,220 There is something looking weird that goes we can not just call this one with by increasing the values 152 00:12:07,220 --> 00:12:13,340 here again and again but what we can do when the function is called Inside the function then it will 153 00:12:13,490 --> 00:12:17,140 call a little modify function from the previous one. 154 00:12:17,180 --> 00:12:25,040 Remember loop like for i.e. in any number set range we are using then what will we do in that one. 155 00:12:25,670 --> 00:12:31,930 We increase by equal to a plus one and then the I's increased by 1. 156 00:12:31,970 --> 00:12:34,340 Every time we get out of that loop. 157 00:12:34,640 --> 00:12:41,870 So we are going to use the same concept to him we will change the size and the angle from the original 158 00:12:41,870 --> 00:12:43,010 one to the next one. 159 00:12:43,790 --> 00:12:47,670 So size will be size plus say 5 each time. 160 00:12:48,290 --> 00:12:56,020 And the angle will be a little one say one and now be denoted by the color here because we have used 161 00:12:56,030 --> 00:12:59,670 the cycle. 162 00:12:59,890 --> 00:13:04,270 See this one run that again. 163 00:13:04,350 --> 00:13:05,830 I did read here 164 00:13:09,070 --> 00:13:11,140 before I got that one. 165 00:13:11,200 --> 00:13:22,000 Now David go red blue green and if you are noticing now we have the orange one and graven even double 166 00:13:22,000 --> 00:13:31,520 of red purple blue blue sorry Gray this one is even double of that particular blue and this one is increasing 167 00:13:31,520 --> 00:13:32,790 again anarchy. 168 00:13:33,320 --> 00:13:42,020 So we are getting actually a very beautiful figure that is a growing flavor but still require some modification. 169 00:13:42,360 --> 00:13:47,620 And the what the last modification left here is the rotation of this one. 170 00:13:47,710 --> 00:13:56,080 This actual center of this blob and that is actually the edge of every circle here that need to be moved. 171 00:13:56,080 --> 00:14:00,280 So what will we do for that one. 172 00:14:00,400 --> 00:14:11,490 We will move this one a little forward so forward they will pass this a first five and in that will 173 00:14:11,490 --> 00:14:16,790 also fold word plus five. 174 00:14:20,460 --> 00:14:29,690 And James this one for something like four here and pass and the barometer. 175 00:14:30,120 --> 00:14:36,660 So because that one also need to be inputted and that's why we have not considered that one before and 176 00:14:36,900 --> 00:14:46,270 provide a value in the beginning say one or just zero because the first one need to be in center and 177 00:14:46,270 --> 00:14:51,910 then we had this forward and now let's try our program again but is actually still running down all 178 00:14:52,060 --> 00:14:58,630 these circles are very large you no of that one again John. 179 00:14:58,810 --> 00:14:59,800 There we go. 180 00:14:59,800 --> 00:15:07,370 This time the one that would require so here we have a main output that we are needed. 181 00:15:07,570 --> 00:15:18,090 Actually that is moving from its particular position and there we go so that's how you can have this 182 00:15:18,090 --> 00:15:26,730 colitis Speyer spider and Saudi but this time they are moving a different one. 183 00:15:26,730 --> 00:15:31,710 You can also have the same values like the one that we have in our example. 184 00:15:31,770 --> 00:15:37,630 So for that one you need to pass here this size are smaller than say 30. 185 00:15:37,680 --> 00:15:46,360 First of all angle will be zero and the forward action date and one in the beginning. 186 00:15:46,360 --> 00:15:49,520 And let me try that one right now there. 187 00:15:49,730 --> 00:15:53,150 There you go. 188 00:15:53,160 --> 00:16:00,210 So this is the one that we needed but actually it is moving from that point and now going secularly 189 00:16:00,630 --> 00:16:05,430 and this will cover a low plate like this one. 190 00:16:05,460 --> 00:16:12,120 So this is nearly equal to the one that we have in the beginning and that is going out of the field. 191 00:16:13,380 --> 00:16:19,620 So that's how you can create these things that easily in the next video we will do some modifications 192 00:16:19,620 --> 00:16:22,470 with that one and see you there. 193 00:16:23,080 --> 00:16:26,760 And let me also show you what we are going to do in the next video. 194 00:16:27,060 --> 00:16:37,630 So that will be going to be a second be Why file this fun so that we've done that one here by ton 3. 195 00:16:37,860 --> 00:16:43,170 Space for don't get e the ideal 196 00:16:46,530 --> 00:16:52,390 loop would be by sometime I told it by how have their big names. 197 00:16:52,720 --> 00:16:58,930 So in the next video you're going to make something like this one a circle then a squared. 198 00:16:59,020 --> 00:17:01,280 Then again a circle square. 199 00:17:01,780 --> 00:17:05,620 And the same pattern like the collider spiral is going on. 200 00:17:06,730 --> 00:17:11,650 So if you are feeling comfortable and if you can make this one then give it a try before watching the 201 00:17:11,650 --> 00:17:12,320 next video. 202 00:17:13,330 --> 00:17:19,360 And if you are not feeling then go with me in the next video we will continue the discussion. 203 00:17:20,030 --> 00:17:20,650 So see you there.