Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {px0, py0} = {1/5, 2/5}; {px1, py1} = {1/10, -2/5};{px4, py4} = {9/10, -3/10}; {px5, py5} = {6/5, 9/10};
- g10 = ListLinePlot[{{px0, py0}, {px5, py5}}, PlotStyle -> {Thick, Blue}]; g11 = ListLinePlot[{{px1, py1}, {px4, py4}}, PlotStyle -> {Thick, Blue}];
- points1 = {{px0, py0}, {px5, py5}};
- points2 = {{px1, py1}, {px4, py4}};
- g10 = Graphics[{Thick, Blue, Line[points1]}]; g11 =
- Graphics[{Thick, Blue, Line[points2]}];
- poly = Graphics[{Lighter[Orange],
- Polygon[Join[points1, Reverse[points2]]]}];
- Show[poly, g11, g10, PlotRange -> All, AspectRatio -> 1/GoldenRatio,
- Frame -> True]
- l1 = {{px0, py0}, {px5, py5}};
- l2 = {{px1, py1}, {px4, py4}};
- ListLinePlot[{l1, l2}, PlotStyle -> Directive[Thick, Blue], Filling -> {1 -> {2}}]
- l1 = {{px0, py0}, {px5, py5}};
- l2 = {{px1, py1}, {px4, py4}};
- l3 = {{px1 + 1/2, py1 + 1/2}, {px4 + 1/2, py4 + 1/2}};(*I just make it*)
- filler1[list1__, list2__, col1_, col2_, lthick_] := Graphics[{col2, Opacity[0.75], Polygon[Join[list1, Reverse[list2]]], Thickness[lthick], col1, Opacity[1], Line[list1], Line[list2]}, Axes -> True]
- filler2[list1__, list2__, col1_, col2_, lthick_] := Graphics[{col2, EdgeForm[{Thickness[lthick], col1}], Opacity[0.75], Polygon[Join[list1, Reverse[list2]]]}, Axes -> True]
- (*lthick is the line thickness*)
- plot1 = filler1[l1, l2, Blue, Gray, 0.02]
- plot2 = filler2[l1, l3, Green, Brown, 0.02]
- Show[plot1, plot2]
- pts = {{1/5, 2/5}, {1/10, -2/5}, {9/10, -3/10}, {6/5, 9/10}};
- RegionPlot[ConvexHullMesh[pts], AspectRatio -> 1/GoldenRatio]
- l1 = {{px0, py0}, {px5, py5}};
- l2 = {{px1, py1}, {px4, py4}};
- ListLinePlot[ Join[{l1, l2},
- {Reverse@#, #2} & @@ Partition[Join[Reverse@l1, l2], 3, 2, {1, 1}]],
- PlotStyle -> {Directive[Thick, Blue], Directive[Thick, Red], None, None},
- Filling -> {3 -> {{4}, LightBlue}}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement