inductor: Draw an inductor

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Draw an inductor

Usage

1
2
3
4
5
inductor(x0, y0, x1, y1, 
         points=FALSE,
         length=0.08, width=length/4,  
         label, pos,
         col=par('col'), lwd=par('lwd'), cex=par('cex'))

Arguments

x0,y0

starting coordinate of element

x1,y1

ending coordinate of element

points

boolean indicating whether to draw dots at the ends of the wire

length

length of zig-zag

width

width of zig-zag

label

optional string placed near component (see pos)

pos

position of label: 0 for below a horizontal component, or to the left of a vertical one, and 1 for the opposite

col

colour

lwd

line width

cex

size of points (ignored unless points is TRUE)

Details

The coordinate system has both x and y ranging from 0 to 1.

Value

Vector containing x0, y0, x1, y1.

Author(s)

Dan Kelley

See Also

The plot must first be set up with circuit.

Examples

1
2
3
4
5
6
library(circuit)
circuit()
resistor(0.1, 0.5, 0.4, 0.5, label="10kohm")
inductor(0.4, 0.2, 0.4, 0.5, label="10uH")
wire(0.4, 0.5, 0.7, 0.5)
ground(0.4, 0.2)

dankelley/circuit documentation built on May 14, 2019, 4:09 p.m.