Illustrator: How to make 'lens elements', convex and concave, shapes?
Just starting out in Illustrator and I want to make a shape such as this:
The way I have done it is like this:
- Make a rectangle
- Move 2 corner anchor points
- Add anchor points on either side
- Move the recently added anchor points inward/outward
- Remove path (because I don't want some points curved) and
Effect-> Stylise-> Rounded
Now, when I go to remove the top anchor as a path, it removes the whole side.
Is there a better way of doing this?
Since Illustrator CS5, these lens-shaped objects can be created in a ridiculously simple and quick way by modifying a thick stroke using the
Width tool. This also has the advantage of keeping the result editable.
Draw a path and give it an adequate stroke width (e.g. 10 pt), which will make for the base 'rectangle'.
Width tool(Shift+W) from the Tool palette, then click into the exact midpoint of the path and drag away from the centre (perpendicular direction). This curves both long sides, going from inwards to outwards, i.e., from biconcave to biconvex.
For a plano-concave or plano-convex shape (one straight side, one curved side), keep the Option / Alt key pressed while dragging; it restricts the curving to one side. This way, each side can be bulged independently, allowing for concave-convex (meniscus) shapes.
That's it. The curvatures can be changed at any time using the Width tool, and the initial stroke width (constituting the 'short sides') can be changed in the Appearance panel. However, to change the filling and give it an outer stroke, the object needs to be expanded (
Object > Expand Appearance), which turns it from an Open Path object into a regular Closed Path object and diminishes easy editing. Expansion is also required if the shape is to be used in Pathfinder operations to construct a Compound Path/Shape object.
There are quite some different lens elements, I will show you how to make a convex element.
Make one ellipse, set it's line (stroke) color to black and the fill color to transparent:
Copy it and place the copy such that they overlay each other:
I've hatched the center part for illustrative purposes, in reality it will be white. The hatched part indicates the shape of your convex element. Change the size and placing of the ellipses such that the lens element shape has the desired thickness and length.
Select both ellipses, click
Window -> Pathfinder and hit
Your result should be:
Again, start with one ellipse, copy it and place the copy such the ellipses don't overlap:
Draw a rectangle over the center part, like this:
Make sure that all corner points lie on the edge of an ellipse.
Your layers should be ordered like this:
If not, reorder the layers.
Now select the two ellipses and the rectangle, go to
Window -> Pathfinder and click
You'll get something like this:
Again you can control the lens shape by placing and sizing the ellipses and the rectangle.