1 00:00:05,820 --> 00:00:11,130 Hey everyone in this video we will learn about it how we can create figures by using program. 2 00:00:12,230 --> 00:00:13,230 So let's move. 3 00:00:13,350 --> 00:00:14,730 Here we had the terminal. 4 00:00:15,090 --> 00:00:25,300 And I will begin with a python shell then importing turtle and I did some until I had acquired Daedalus 5 00:00:25,390 --> 00:00:26,190 D. 6 00:00:27,070 --> 00:00:30,340 So again then that one. 7 00:00:31,950 --> 00:00:35,250 And in both total as D. 8 00:00:35,410 --> 00:00:36,840 There we go. 9 00:00:36,850 --> 00:00:44,440 And now to access the window any command you can run they will go would be down. 10 00:00:44,590 --> 00:00:50,720 Now I want to do something like creating a finger first by using simple commands. 11 00:00:50,750 --> 00:00:53,840 So for that one I am taking this goes right down up to here. 12 00:00:55,370 --> 00:01:06,400 So this one first then up and now this point is actually before the x axis because this is the. 13 00:01:06,840 --> 00:01:12,260 If we take this one origin this is positive X this is negative X this is positive y this is negative 14 00:01:12,260 --> 00:01:12,500 y. 15 00:01:12,890 --> 00:01:15,680 So this point actually is negative x and positive fine. 16 00:01:16,730 --> 00:01:23,560 So we don't go to and that will be at approximately minus 250 and plus 250. 17 00:01:23,570 --> 00:01:27,140 They go now to create a squared here. 18 00:01:27,140 --> 00:01:39,300 What will I do I simply did not fold one in 200 with bendable they will be bend and let me try that 19 00:01:39,300 --> 00:01:47,610 one they will go after that one I will do the right to make a 90 degree angle they will go with 90 degree 20 00:01:48,360 --> 00:01:57,780 hundreds and I will run these commands again but I did something wrong this time did what left I passed 21 00:01:57,780 --> 00:02:04,700 it on twice they will now again forward then great again forward. 22 00:02:04,710 --> 00:02:11,190 David over the square so this is how you can create a square but it requires a number of lines so to 23 00:02:11,190 --> 00:02:20,070 show that one what we will do we will use loop in this one so simply for our basic for loop and now 24 00:02:20,070 --> 00:02:26,100 we do know what end is kind of barometer anything in that we just required to run these commands four 25 00:02:26,100 --> 00:02:27,980 times one two three and four. 26 00:02:28,290 --> 00:02:30,110 So we simply take our variable I. 27 00:02:30,780 --> 00:02:40,090 So for i in range 1 to let me try that one again for i in range 28 00:02:46,120 --> 00:02:55,420 1 to 5 and what will I do in that one I will add these commands student forward and then I will pass 29 00:02:55,430 --> 00:03:09,180 data say two hundred because Square this time and Dede don't write 90 and they will be the square then 30 00:03:11,160 --> 00:03:19,140 let me make this only larger so you can notice this on a square by just choosing three commands and 31 00:03:19,140 --> 00:03:20,540 that required a number of command. 32 00:03:21,030 --> 00:03:28,410 So when I need to tell you here is you can use the loops to create any kind of figures let me show you 33 00:03:28,410 --> 00:03:41,330 some of that also first d don't then up and then make this fun to go in center so you don't go to 0 34 00:03:41,340 --> 00:03:53,650 0 0 we Dedmon not to create any circle what you need to do first bend down and change the color say 35 00:03:53,650 --> 00:03:54,270 it red 36 00:03:57,340 --> 00:04:02,440 and to create any circle you just need to write did not see eye ah see Ellie because you going to do 37 00:04:02,620 --> 00:04:08,530 moving a point one hundred and eighty times so you just need to rotate the circle and in panties you 38 00:04:08,530 --> 00:04:15,910 need to pass the radius say twenty nine it will create a circle of radius twenty and that is actually 39 00:04:15,910 --> 00:04:23,500 a circle but it seems to be unknown circle of figure because if you zoom this one there are edges there 40 00:04:24,700 --> 00:04:32,680 but still we can see that this one is a circle and you can create this one with any radius like these 41 00:04:33,400 --> 00:04:44,070 and you can also try things like First let me change this one color to do you do color say blue and 42 00:04:44,080 --> 00:05:01,300 now for i in range one to one hundred eighty one up to 180 b don't circle in that one pass by if you 43 00:05:01,300 --> 00:05:08,270 do that one it will create one hundred and eighty circles one about the other and with increasing one 44 00:05:08,290 --> 00:05:09,370 with each radius. 45 00:05:10,150 --> 00:05:16,120 So this is something I have done that I did not have to because it will take a little time to create 46 00:05:16,120 --> 00:05:17,800 one hundred and eighty figures. 47 00:05:18,280 --> 00:05:25,110 So I'm posing a video for a little time because at this point it has only reach up to twenty five. 48 00:05:25,390 --> 00:05:32,090 So here this one actually done and this one takes more than 15 minutes I believe the thing I forget 49 00:05:32,110 --> 00:05:32,600 here. 50 00:05:32,760 --> 00:05:34,960 If Greece disappeared that's why that is very slow. 51 00:05:35,350 --> 00:05:45,070 If I had done this one like First let me change the cards at any other position say the don't go to 52 00:05:46,120 --> 00:05:54,630 and one day my nasty they go with this and they don't. 53 00:05:54,740 --> 00:06:06,100 Carla Fred and increase the speed they don't speed say hundreds and if I run that loop again let's try 54 00:06:06,100 --> 00:06:17,960 that one again but it did it this time just 90 and we have data circle I and they if you can notice 55 00:06:17,960 --> 00:06:26,550 this one increasing very fast and this one has digged this time at hundreds feet so that something we 56 00:06:26,550 --> 00:06:29,280 can accept 15 after that one. 57 00:06:29,400 --> 00:06:34,180 You can also chase these circles like let me have this one first. 58 00:06:34,230 --> 00:06:36,680 Again do any of the pollution like this one. 59 00:06:36,720 --> 00:06:40,330 So this is positive on both side. 60 00:06:40,450 --> 00:06:52,880 Hope you don't go to say 150 and 150 a little more or 15 there. 61 00:06:53,980 --> 00:07:01,590 That's enough maybe now you can also change that loop something like that with those dealt with Dedmon 62 00:07:01,740 --> 00:07:03,580 just 10 values here. 63 00:07:09,490 --> 00:07:13,890 So can I add bass here. 64 00:07:14,090 --> 00:07:24,270 They don't left say any data for each and then you will find this one but that's very small 65 00:07:27,200 --> 00:07:27,920 and 66 00:07:30,900 --> 00:07:32,470 circle I plus. 67 00:07:32,520 --> 00:07:38,640 Let me take a particular value first 90 C and then pass this one here. 68 00:07:39,440 --> 00:07:45,760 Maybe go like this one so you can create these drinks also that look like a 3D structure one about the 69 00:07:45,760 --> 00:07:49,600 other so these are the figures you can create. 70 00:07:49,620 --> 00:07:55,210 One more I want to show you with this one is safety. 71 00:07:55,230 --> 00:08:07,890 Don't go to and this position approximately 150 and on the y axis this one is approximately minus 250. 72 00:08:09,540 --> 00:08:13,140 So there we have this one here at this position. 73 00:08:13,160 --> 00:08:23,750 Now what I will do I will have an entire loop in which I have 10 values and instead of this circle I'm 74 00:08:23,770 --> 00:08:25,030 going to create a stop. 75 00:08:25,900 --> 00:08:27,700 So how can I create a star. 76 00:08:27,880 --> 00:08:38,210 Simply they don't forward we'd say one hundred and fifty degree and for creating a star regionally use 77 00:08:38,210 --> 00:08:39,120 an angle. 78 00:08:39,430 --> 00:08:44,050 So they don't left and that angle will be say 135 this time. 79 00:08:45,130 --> 00:08:46,440 And David go with that one. 80 00:08:46,480 --> 00:08:53,890 So here a star like this one is created and to increase the number of these both stars here like this 81 00:08:53,890 --> 00:08:55,720 one has eight corners. 82 00:08:56,170 --> 00:09:04,910 So it mean for particular one for the opposite one so you can use the Formula 1 at T minus 180 divided 83 00:09:04,910 --> 00:09:10,220 by the coordinates you require the like here we have four men then by four. 84 00:09:10,310 --> 00:09:11,770 This one equal to 135. 85 00:09:12,620 --> 00:09:18,230 So the number of columns you require according to which you can change the angles here. 86 00:09:18,470 --> 00:09:20,660 So that's how you can create these kinds of figure. 87 00:09:21,320 --> 00:09:25,680 And this is the basic about creating figures in the next module. 88 00:09:25,740 --> 00:09:31,850 So right next to it you have to show you something like creating of a robotic figure by using only this. 89 00:09:31,920 --> 00:09:33,180 So thanks for watching. 90 00:09:33,210 --> 00:09:34,020 Soon that video.