issue102:tutoriel_4
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue102:tutoriel_4 [2015/11/01 18:51] – créée auntiee | issue102:tutoriel_4 [2015/11/07 00:45] (Version actuelle) – erlevo | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | This month we're going to start looking at Live Path Effects (LPEs). These are a way to add more powerful capabilities to paths – such as drawing a pattern that follows a path (for creating ropes and chains), or rendering a path as though it's been roughly sketched. There are 13 LPEs in version 0.48, increasing to 15 in 0.91 with a slight change of UI as well. | + | **This month we're going to start looking at Live Path Effects (LPEs). These are a way to add more powerful capabilities to paths – such as drawing a pattern that follows a path (for creating ropes and chains), or rendering a path as though it's been roughly sketched. There are 13 LPEs in version 0.48, increasing to 15 in 0.91 with a slight change of UI as well. |
Let's dive straight in with a relatively simple LPE: Spiro Spline. | Let's dive straight in with a relatively simple LPE: Spiro Spline. | ||
- | Draw a path using Bézier tool, consisting of straight lines forming a simple spiral type of shape. Something like this: | + | Draw a path using Bézier tool, consisting of straight lines forming a simple spiral type of shape. Something like this:** |
- | Now select the path and open the LPE dialog using the Path > Path Effects... menu option (Path Effect Editor... in 0.48). At this point, the user interface diverges. To add the Spiro Spline LPE to your path: | + | Ce mois-ci, nous allons consacrer un premier regard aux effets de chemin. Ils nous donnent la possibilité d' |
+ | |||
+ | Plongeons directement dans le grand bain avec un effet relativement simple : Spline spirographique. | ||
+ | Dessinez un chemin avec l' | ||
+ | |||
+ | **Now select the path and open the LPE dialog using the Path > Path Effects... menu option (Path Effect Editor... in 0.48). At this point, the user interface diverges. To add the Spiro Spline LPE to your path: | ||
• In 0.48.x, select “Spiro spline” from the drop-down list of effects at the top of the dialog, then click on the Add button next to it. | • In 0.48.x, select “Spiro spline” from the drop-down list of effects at the top of the dialog, then click on the Add button next to it. | ||
- | • In 0.91, click the “+” button at the bottom left of the dialog. This will open another dialog listing the available effects. Scroll down and select “Spiro spline,” then click the Add button. The second dialog will close, adding the effect to the list in the main dialog. | + | • In 0.91, click the “+” button at the bottom left of the dialog. This will open another dialog listing the available effects. Scroll down and select “Spiro spline,” then click the Add button. The second dialog will close, adding the effect to the list in the main dialog.** |
- | With the Spiro Spline effect added to your path, you might be a little underwhelmed to see that there's been no change to the appearance of your spiral. This is because the spiro algorithm works only on paths where some of the nodes are smooth or symmetrical. Currently, all the nodes in our shape are corner/cusp nodes. Double-click on the path to both select it and switch to the node tool, and you should see that all the nodes have the diamond-shaped handles that represent cusp nodes. Press CTRL-A to select them all, and use the buttons on the tool control bar to change them to smooth, symmetrical or auto-smooth. Immediately you should see the effects of the spiro algorithm, as your square spiral turns into a super-smooth version. | + | Maintenant sélectionnez ce chemin et ouvrez le dialogue des effets de chemins : Chemins > Effets de chemin… (Éditeur d'effets de chemin… dans la version 0.48). Ici, les interfaces utilisateur divergent. Pour appliquer Spline spirographique à votre chemin : |
+ | * dans la version 0.48 choisissez Spline spirographique dans le menu déroulant en haut du dialogue, puis cliquez sur le bouton « Ajouter » à côté ; | ||
+ | * dans la version 0.91 cliquez sur le signe « + » en bas à gauche du dialogue. Cela ouvrira un nouveau dialogue énumérant les effets disponibles. Faites défiler vers le bas, sélectionnez Spline spirographique et cliquez sur Ajouter. Ce second dialogue se fermera en ajoutant l' | ||
- | You may be forgiven for thinking that your new spiral is just a normal result of switching | + | **With the Spiro Spline effect added to your path, you might be a little underwhelmed |
- | The real difference comes when you start to manipulate the path: spiro splines are indifferent to changes in the node handles, so the most practical way to modify the path is to move the nodes themselves. The algorithm is a little unstable, and can sometimes shoot off into wild shapes as you do so; undoing your edit, or moving the nodes a little more, will generally get things back on track. For example, this image shows a green original path, plus the same path with the spiro LPE added in purple, demonstrating just how out-of-control the spiro algorithm can get! | + | Une fois l' |
- | As well as moving | + | **You may be forgiven for thinking that your new spiral is just a normal result of switching to smooth |
- | The spiro algorithm was originally created by Raph Levien for font design (see http:// | + | Vous êtes pardonnable si vous pensez que votre nouvelle spirale n'est que le résultat normal du lissage des nœuds, mais ce n'est pas le cas. Dans le dialogue des effets de chemin vous remarquerez une icône en forme d’œil à côté de l'entrée |
- | Now it's time to draw something on the canvas: the kind of shape that suits spiro mode. Try drawing a circle, keeping it as neat as you can, and finishing | + | **The real difference comes when you start to manipulate |
- | Select the path you've drawn, and, in the Path Effects dialog, you should see that the Spiro Spline effect has been added. Toggle the visibility button (the eye-shaped icon) to see how the spiro version | + | La principale se manifeste quand vous commencez à manipuler le chemin : les splines spirographiques sont insensibles aux modifications des poignées des nœuds. La meilleure façon de modifier le chemin est donc de déplacer les nœuds eux-mêmes. L'algorithme est quelque peu instable et peut parfois faire surgir des formes improbables à cette occasion. Annuler votre modification ou déplacer encore un peu plus les nœuds remettra généralement les choses en ordre. Par exemple, l' |
- | When using the Bézier tool in spiro mode, the icon on the tool control bar is the same, but the drawing process is a little different. I usually suggest drawing Bézier paths as a series of straight | + | **As well as moving nodes, there' |
- | One big problem with having spiro buttons on these two tools it that it's easy for newcomers to Inkscape to enable them, then forget about it. A common question on the support forums is, “why can't I change the shape of my path using the node handles?” The answer is usually because the Spiro LPE has unintentionally been added, so watch out for that if you find yourself similarly stuck. | + | En plus du déplacement des nœuds, il existe une autre manière de modifier un chemin spirographique : |
- | Let's move on to another LPE: Gears. | + | **The spiro algorithm was originally created by Raph Levien for font design (see http:// |
+ | |||
+ | L' | ||
+ | |||
+ | **Now it's time to draw something on the canvas: the kind of shape that suits spiro mode. Try drawing a circle, keeping it as neat as you can, and finishing in the starting node. As you draw you'll see a green line indicating your path, regardless of your current fill and stroke settings – don't worry, that's just a guideline that won't be visible when you've finished. Unless you have supernatural control over your muscles, the green path is likely to be bumpy and distorted; yet, on releasing the mouse button, it will be replaced with a nicely rounded circle. If your original path was extremely rough, you might not get a perfect circle, but the final shape will certainly be a lot smoother than your hand-drawn efforts.** | ||
+ | |||
+ | Maintenant, il est temps de dessiner quelque chose, le type de forme qui se prête bien aux splines spirographiques. Essayez de dessiner un cercle aussi régulier que possible en terminant votre tracé par son point de départ. À mesure que vous dessinez, vous verrez une ligne verte qui prévisualise votre tracé sans tenir compte du type de trait et du remplissage. Ne vous en faites pas : il s'agit juste d'un guide qui ne sera plus visible quand vous aurez terminé. À moins que votre main ne soit d'une stabilité surnaturelle, | ||
+ | |||
+ | **Select the path you've drawn, and, in the Path Effects dialog, you should see that the Spiro Spline effect has been added. Toggle the visibility button (the eye-shaped icon) to see how the spiro version compares with your original path. Now try the process again with a different shape – a figure of eight, or a spiral. As you can see, for some shapes it's a lot easier to create something neat and smooth using spiro mode.** | ||
+ | |||
+ | Sélectionnez le chemin que vous venez de dessiner et, dans le dialogue des effets de chemin, vous verrez que l' | ||
+ | |||
+ | **When using the Bézier tool in spiro mode, the icon on the tool control bar is the same, but the drawing process is a little different. I usually suggest drawing Bézier paths as a series of straight line segments by single-clicking to place each node, then going back in Node Edit mode to add curves afterwards. If you take that approach with spiro mode enabled, you'll get a series of corner nodes which, as we've seen, don't really play a role in the spiro algorithm. Instead you need to click-and-drag as you place each node, in order to set the curves as you go along. Personally, I find this to be much harder to control, but give it a try to see if you're better at it than me! You can always lay down straight segments with spiro mode enabled, then explicitly change some points into cusp nodes afterwards. It's not a huge workflow improvement, | ||
+ | |||
+ | Quand vous utilisez l' | ||
+ | |||
+ | **One big problem with having spiro buttons on these two tools it that it's easy for newcomers to Inkscape to enable them, then forget about it. A common question on the support forums is, “why can't I change the shape of my path using the node handles?” The answer is usually because the Spiro LPE has unintentionally been added, so watch out for that if you find yourself similarly stuck.** | ||
+ | |||
+ | Un des problèmes posés par la disponibilité du mode spirographique pour ces deux outils est qu'il est facile pour les néophytes d' | ||
+ | |||
+ | **Let's move on to another LPE: Gears. | ||
You first have to draw a path with at least three nodes – to begin, I'll use exactly three so that it's clear what the relevance of each one is. With your path drawn and selected, open the Path Effects dialog and add the Gears LPE. You should immediately see your path replaced by a gear. Double-click on it so that you can see the three nodes and move them around. It should quickly become apparent that the nodes are used to set: | You first have to draw a path with at least three nodes – to begin, I'll use exactly three so that it's clear what the relevance of each one is. With your path drawn and selected, open the Path Effects dialog and add the Gears LPE. You should immediately see your path replaced by a gear. Double-click on it so that you can see the three nodes and move them around. It should quickly become apparent that the nodes are used to set: | ||
1) The angle of the first gear tooth, relative to the center point. | 1) The angle of the first gear tooth, relative to the center point. | ||
2) The center point of the gear. | 2) The center point of the gear. | ||
- | 3) The radius of the gear (from the center to the mid-point of the tooth). | + | 3) The radius of the gear (from the center to the mid-point of the tooth).** |
- | With your gear selected, switch to the Bézier tool. The start and end nodes of your path should be visible: click on the end node, then double-click somewhere else on the canvas to add another segment to your path. Now the path has four nodes, and you should find that a second gear has been added, centered at the new end node. | + | |
+ | Voyons un autre effet de chemin : les engrenages. | ||
+ | |||
+ | Vous devez commencer par dessiner un chemin avec au moins trois nœuds – au début, j'en utiliserai exactement trois pour rendre le rôle de chacun parfaitement clair. Une fois le chemin dessiné et sélectionné, | ||
+ | 1. l' | ||
+ | 2. le centre de la roue ; | ||
+ | 3. le rayon (du centre au milieu de la dent). | ||
+ | |||
+ | **With your gear selected, switch to the Bézier tool. The start and end nodes of your path should be visible: click on the end node, then double-click somewhere else on the canvas to add another segment to your path. Now the path has four nodes, and you should find that a second gear has been added, centered at the new end node.** | ||
+ | |||
+ | L' | ||
+ | |||
+ | **You can repeat this process to add more nodes, and hence more gears. Applying the Gear LPE to any path with more than three nodes follows the same rules: the first three nodes define the parameters for the first gear, and any subsequent nodes set the center points for additional gears in the chain. Once you've got a few gears on screen, switch to the node tool to move their centers, noting how Inkscape automatically adjusts the radius and number of teeth in the process. Try dragging the first node around the second one to crank your gear train into life (after all, it is a LIVE path effect).** | ||
+ | |||
+ | Vous pouvez répéter la manipulation pour ajouter plus de nœuds et donc plus de pignons. Appliquer cet effet à n' | ||
+ | |||
+ | **As well as the values that are implicitly set by the positions of the nodes, there are two additional parameters required to fully specify the effect. These can be found at the bottom of the Path Effects dialog, in fields labelled “Teeth” (the number of teeth on the first gear), and “Phi” (the “tooth pressure angle” - set it to about 20 for realistic looking teeth). Almost all LPEs populate this part of the dialog with a UI of some sort, and in some cases the number of additional parameters is rather excessive (watch out if you're working on a small screen!).** | ||
+ | |||
+ | En plus des valeurs contrôlées par la position des nœuds, deux paramètres supplémentaires sont nécessaires pour complètement spécifier l' | ||
+ | |||
+ | **You may have guessed from the UI that it's possible to apply more than one LPE to a path. In programming terms you can think of an LPE as a function that takes a path as an input, and produces another path as an output, allowing you to chain them together. Be aware, however, that the order in which you chain them is significant. Consider this simple path, made up of cusp nodes: | ||
+ | If we apply either the Spiro Spline or Gears LPE to the path we get the results we'd expect:** | ||
+ | |||
+ | Vous avez peut-être deviné en observant l' | ||
+ | |||
+ | Si nous appliquons l'un ou l' | ||
- | You can repeat this process | + | **But if we apply both LPEs to the path, the effects differ greatly depending on the order. We'll start with the least surprising combination: Gears first and Spiro Spline second. |
+ | It may not be easy to see, but the only real effect is that the teeth of the gears have become more rounded (though each gear also has one tooth that's misshapen). Thinking about our chain of LPEs the general effect makes some sense: the first LPE outputs | ||
- | As well as the values that are implicitly set by the positions of the nodes, there are two additional parameters required to fully specify the effect. These can be found at the bottom of the Path Effects dialog, in fields labelled “Teeth” | + | Mais si nous appliquons les deux effets à ce chemin, l' |
+ | Cela n'est peut-être pas facile à voir, mais les dents sont maintenant plus arrondies | ||
- | You may have guessed from the UI that it's possible to apply more than one LPE to a path. In programming terms you can think of an LPE as a function that takes a path as an input, and produces another path as an output, allowing you to chain them together. Be aware, however, that the order in which you chain them is significant. Consider this simple | + | **Now we've got a load more gears! This is because |
- | If we apply either | + | |
- | But if we apply both LPEs to the path, the effects differ greatly depending on the order. We' | + | Why not practice drawing naturalistic curves and mechanistic gears, then next time we' |
- | It may not be easy to see, but the only real effect is that the teeth of the gears have become more rounded (though each gear also has one tooth that's misshapen). Thinking about our chain of LPEs the general effect makes some sense: the first LPE outputs a composite path in the shape of the gears, then the spiro algorithm is applied to that path, smoothing out any cusp nodes that are present in it. But what happens if we apply the Spiro Spline LPE first, and the Gears LPE second? | + | |
- | Now we've got a load more gears! This is because the path that is created by the Spiro Spline | + | Maintenant nous avons beaucoup plus de pignons ! C'est parce-que le chemin créé par Spline |
- | Why not practice drawing naturalistic curves and mechanistic gears, then next time we'll continue to look at some of the other LPEs that are available. | + | Pourquoi ne pas vous entraîner à dessiner des courbes organiques et des engrenages réalistes ? |
issue102/tutoriel_4.1446400263.txt.gz · Dernière modification : 2015/11/01 18:51 de auntiee