How Can I Create and Connect Circuit Elements in Mathematica Using Graphics?

In summary, the student tried to create a circuit using line graphics in Mathematica, but ran into issues. He was able to create the circuit symbols, but was having difficulty combining them into a complete circuit.
  • #1
Michaud12
20
0

Homework Statement


I need to find a away to make circuit elements (resister capacitor etec) in Mathematica using lines graphic, and I am new to this so I am not really sure how...and i need to connect the elements to make a circuit.


i think i made a resister

Graphics[Line[{{0, 0}, {1, 0}, {2, -1}, {3, 1}, {4, -1}, {5,
1}, {6, -1}, {7, 0}, {8, 0}}]]

but I having issues with the rest..
 
Physics news on Phys.org
  • #2
several hours later and I've made no progress, i can't even join two lines to make 1 side of the capacitor. If ANYONE has the slightest idea how to help, i really need it
 
  • #3
The "Show" command will display multiple graphics entities at the same time, which may come in handy. Mathematica is not the easiest tool to use here, for sure. Would it be possible to draw the circuit elements in another program and import the image into Mathematica?
 
  • #4
Mapes said:
The "Show" command will display multiple graphics entities at the same time, which may come in handy. Mathematica is not the easiest tool to use here, for sure. Would it be possible to draw the circuit elements in another program and import the image into Mathematica?

no this is the last homework in a mathematica class. so we need to use it for the whole thing. The other assignments seemed useful but this one one pointless
 
  • #5
making the capacitor symbol is really giving me trouble
this is what i have
Cap1 = Graphics@Line[{{1, 0}, {1, .5}}] gave me a vertical line
Cap2 = Graphics@Line[{{0, .25}, {1, .25}}] gave me horizontal line
Capleft = Show[Cap1, Cap2] gave me half of the capacitor logo
then i rotated that 180 degrees to get the other side, then i tried show to combine them but it won't let me
 
Last edited:
  • #6
What does your complete code look like?
 
  • #7
i had to break each element into sections but i manged to do it just using the line graphic, it was a pain the the *** tho
 

1. How do I plot a function in Mathematica?

To plot a function in Mathematica, you can use the Plot function. For example, if you want to plot the function y = x^2, you would type Plot[x^2, {x, -5, 5}] where the first argument is the function and the second argument is the range of values for the variable x.

2. Can I customize the appearance of my Mathematica plots?

Yes, you can use various options and parameters to customize the appearance of your Mathematica plots. For example, you can change the color, style, and size of the plot using the options such as PlotStyle, PlotMarkers, and ImageSize.

3. How do I add labels and titles to my Mathematica plots?

To add labels and titles to your Mathematica plots, you can use the options such as PlotLabel, AxesLabel, and PlotLegends. These options allow you to add titles, axis labels, and legends to your plots.

4. Is it possible to combine multiple plots in Mathematica?

Yes, you can combine multiple plots in Mathematica using the Show function. This function allows you to combine different plots into a single figure by specifying them as arguments. You can also use the options such as PlotRange and PlotRangePadding to adjust the appearance of the combined plot.

5. How can I export my Mathematica plots for use in other documents?

To export your Mathematica plots, you can use the Export function. This function allows you to save your plots in various formats such as PNG, PDF, and EPS. You can also use the options such as ImageResolution and ImageSize to control the quality and size of the exported plot.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
322
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
249
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
899
  • Engineering and Comp Sci Homework Help
Replies
9
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
867
  • Programming and Computer Science
Replies
15
Views
2K
Back
Top