Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoyama010 authored Apr 20, 2024
1 parent 4456c43 commit 48815c2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ import skgmsh as sg
We can define the surface using PyVista.

```python
edge_source = sg.Polygon(n_sides=4, radius=8, fill=False)
source = sg.Polygon(n_sides=4, radius=8, fill=False)
```

We can then generate a 2D mesh.

```python
mesh = sg.frontal_delaunay_2d(edge_source, target_sizes=2.0)
mesh = source.frontal_delaunay_2d(edge_source=source, target_sizes=2.0)
```

To visualize the model, we can use PyVista.
Expand All @@ -75,7 +75,7 @@ _ = plotter.add_mesh(
lighting=False,
edge_color="gray",
)
_ = plotter.add_mesh(edge_source, show_edges=True, line_width=4, color="gray")
_ = plotter.add_mesh(source, show_edges=True, line_width=4, color="gray")
plotter.show(cpos="xy")
```

Expand All @@ -86,8 +86,8 @@ plotter.show(cpos="xy")
We can also generate a 3D mesh.

```python
edge_source = sg.Cube()
mesh = sg.delaunay_3d(edge_source, target_sizes=0.2)
source = sg.Cube()
mesh = source.delaunay_3d(edge_source=source, target_sizes=0.2)
```

```python
Expand All @@ -100,7 +100,7 @@ _ = plotter.add_mesh(
lighting=False,
edge_color="gray",
)
_ = plotter.add_mesh(edge_source.extract_all_edges(), line_width=4, color="gray")
_ = plotter.add_mesh(source.extract_all_edges(), line_width=4, color="gray")
_ = plotter.add_box_axes()
plotter.show()
```
Expand Down

0 comments on commit 48815c2

Please sign in to comment.