TransWikia.com

Conditional contour plot

Mathematica Asked by grdgfgr on December 28, 2020

I want to plot implicit plots in certain regions. For example plot the section of the hyperbola that is in between the wedge. But I could not find out how to do this. Multiplying the first expression with a <> expression does not work.

enter image description here

2 Answers

Add RegionFunctionas an option

ContourPlot[x^2/15^2 - y^2/(-15^2 + 37^2) == 1, {x, -50, 50}, {y, -50, 50}, 
RegionFunction ->Function[{x, y},y <= Tan[15 Degree] (x + 37) && y >= - Tan[15 Degree] (x + 37)]]

enter image description here

Correct answer by Ulrich Neumann on December 28, 2020

You can also use ConditionalExpression as follows:

ContourPlot[{ConditionalExpression[x^2/15^2 - y^2/(-15^2 + 37^2), 
    Abs[y] <= Tan[15 Degree] (x + 37)] == 1, 
  Abs[y] == Tan[15 Degree] (x + 37)} ,
 {x, -50, 50}, {y, -50, 50}]

enter image description here

Answered by kglr on December 28, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP