Рубрики

draw

Steps to draw clouds gradually

Note that we have also added the t.Screen().tracer(0,0) and t.Screen().update() lines to speed up the drawing


Setting up the screen

To set up the stage let’s first configure the height and the width of the canvas. We need the screensize command to set the size of the window, and the setworldcoordinates command to subdivide the window into the desired number of pixels. setworldcoordinates also sets up the coordinate axes for us

import turtle as t t.Screen().screensize(500,500) t.Screen().setworldcoordinates(-300,300,300,900) t.Screen().bgcolor("lightblue") 

Enter fullscreen mode

Exit fullscreen mode

We will be using a square grid. We have also set the color to lightblue using bgcolor

In the code above we have set the coordinate y-axis range to be within 300 and 900. This will make sense in the upcoming sections

image

We now have a blue sky

Draw a cloud

We will be using circles to draw a cloud but there could be multiple other ways to draw a cloud.

First start with a filled circle

import turtle as t t.Screen().bgcolor("lightblue") t.color("white","white") t.begin_fill() t.circle(50) t.end_fill() 

Enter fullscreen mode

Exit fullscreen mode

image

Now, lets put that code into a function

import turtle as t t.Screen().bgcolor("lightblue") def filled_circle(radius, color): t.color(color,color) t.begin_fill() t.circle(radius) t.end_fill() filled_circle(50,"white") 

Enter fullscreen mode

Exit fullscreen mode

Filled circle function. Code does the same thing as before

Next we will draw multiple circles using the function above

import turtle as t t.Screen().bgcolor("lightblue") def filled_circle(radius, color): t.color(color,color) t.begin_fill() t.circle(radius) t.end_fill() radius = 50 cloud_color="white" filled_circle(radius,cloud_color) t.forward(radius) filled_circle(radius,cloud_color) t.right(90) filled_circle(radius,cloud_color) t.right(90) filled_circle(radius,cloud_color) t.right(90) filled_circle(radius,cloud_color) t.right(90) 

Enter fullscreen mode

Exit fullscreen mode

Multiple calls to filled_circle at different positions

image

We have a cloud now! ( Hope you think so too 🙂 )

import turtle as t t.Screen().bgcolor("lightblue") def filled_circle(radius, color): t.color(color,color) t.begin_fill() t.circle(radius) t.end_fill() def cloud(radius, cloud_color="white"): filled_circle(radius,cloud_color) t.forward(radius) filled_circle(radius,cloud_color) t.right(90) filled_circle(radius,cloud_color) t.right(90) filled_circle(radius,cloud_color) t.right(90) filled_circle(radius,cloud_color) t.right(90) radius = 50 cloud(radius) 

Enter fullscreen mode

Exit fullscreen mode

cloud function for use later


Concentric circles

Let’s work on the rainbow now. Our approach will be to use concentric filled circles to draw the rainbow. Let’s see if we can get what we want by progressively reducing the radius of the filled_circle function.

import turtle as t t.Screen().bgcolor("lightblue") def filled_circle(radius, color): t.color(color,color) t.begin_fill() t.circle(radius) t.end_fill() filled_circle(100,'red') filled_circle(95,'orange') filled_circle(90,'yellow') filled_circle(85,'green') filled_circle(80,'blue') filled_circle(75,'indigo') filled_circle(70,'violet') 

Enter fullscreen mode

Exit fullscreen mode

Reducing radius progressively and changing the color

image

We have a roygbiv but the circles are not concentric

Let’s see how to make the circles above concentric. Let’s also use a loop

import turtle as t t.Screen().bgcolor("lightblue") def filled_circle(radius, color): t.color(color,color) t.begin_fill() t.circle(radius) t.end_fill() roygbiv=['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'] radius=200 interval=10 for r_color in roygbiv: filled_circle(radius,r_color) radius -= interval # Move turtle a up by a little t.left(90) t.forward(interval) t.right(90) 

Enter fullscreen mode

Exit fullscreen mode

In the code above we move the turtle up a little every time it completes a circle. We have also stored the colors of the rainbow in a list.

image

There are two additional things we should do. First, a rainbow could be circular but generally we see just a portion of the rainbow. To get that effect, we can move half the rainbow off the screen. Second, the center of the rainbow should be the sky. So let’s make those adjustments

import turtle as t t.Screen().bgcolor("lightblue") t.Screen().screensize(500,500) t.Screen().setworldcoordinates(-300,300,300,900) def filled_circle(radius, color): t.color(color,color) t.begin_fill() t.circle(radius) t.end_fill() def rainbow(radius=200,interval=10): roygbiv=['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet', 'lightblue'] for r_color in roygbiv: filled_circle(radius,r_color) radius -= interval # Move turtle a up by a little t.left(90) t.forward(interval) t.right(90) rainbow(300,10) 

Enter fullscreen mode

Exit fullscreen mode

In the code above, we have changed the screen size and set up the coordinates such that only half the rainbow shows. Also, the rainbow code is now in a function. Lastly to show the center of the rainbow as the sky, lightblue has been added to the roygbiv variable


Drawing Clouds in Piranesi

This tutorial is going to demonstrate how to use the mouse to draw clouds with a watercolor effect brush in Piranesi. You will be using your mouse to achieve this effect as not everyone may have the use of a graphics tablet. The final picture is a SketchUp model completed with this process for making the clouds.

drawing_clouds

Step 1. In Piranesi select File> New. The following window will open. Select Create an Epix file and then click Next.

The following window will open. Do not modify any parameters and just click Finish.

Step 2. Select the Brush tool. Click on the top left corner Style Selector and select Piranesi Tools and Brush marks from the drop down menu. Select the brush marked Powdery paint.

Step 3. Adjust the brush parameters. Go to the toolbar to the top right where it says Grain, Opacity and Blend. Leave Grain unchecked. Set Opacity to 50 % and select Ink for Blend.

Step 4. Next click on the blue circle to the right of the Blend panel. This is the Radial fade button. Then click on the “>>” icon which is for more detailed grain and fade settings. Set Radial fade to 2D mode – You are going to select the center or the most saturated part of the fade by clicking on pick… and clicking once in the drawing area. Now make sure Place center at start of stroke is ticked. Now you are going to choose the range of the fade. Click on Pick…next to the Range box and drag your brush to the right to determine the range of Fade. You can also type in the range you want, so let’s set it at about 138-140. You can experiment with these settings to get the brush stroke you want.

Step 5. In the Tool Options toolbar (top left) adjust the Angle of the brush to -83 degrees, so that the brush strokes will be set to vertical. Set the Brush pixel size to 120-125. You can experiment with the brush sizes if you want and see what difference it makes. For now we will use these settings below.

Step 6. You are now ready for drawing. Experiment now using the path of the mouse. If you drag the mouse quickly you would get a “sand pen” effect. If you drag slowly the start point is dark, fading out to the parameters you set.

If you do not want a “sand pen” effect then you can modify the parameters of the brush as follows:

In the Tool Options toolbar shown here, click on “>>” icon

Modify the Parameters

In the dialogue box that opens you can see, Repeat Normal is the default option. In this setting if the mouse is dragged quickly, it is possible that some parts can not be drawn because of the gaps you get. If you drag slowly, then it will be uniform in all areas of the painting. In this way when dragging the mouse again you will find that the effect has changed.

With Repeat Continuous selected, regardless of how fast you drag the mouse, it will be evenly colored from saturated to fade. You only need to change the Repeat option to Continuous to get this effect.

Step 7. Combination Strokes. Attention to the convergence of the brush strokes can be used to complete the local halo. The converging faded halo can also be used in places where it has not begun to converge.

You can also be flexible with brush application and other functions, such as change the existing overlay mode (Blend) for Paint. It is all a process of experimentation once you have the basic brush setup and using different strokes.

Different Blend Mode

Final image using this process for the clouds.

Hope you found this tutorial useful and it has helped extend your knowledge of Piranesi.

Colin Wynn
the authorColin Wynn

Leave a Reply