Properties
Category
English
Similar Topics
Statistics
Comments
31
Participants
6
Subscribers
0
Votes
11
Views
5655
Share
How to determine whether a point is inside a closed region?
Answered
:smiley_cat:
I have two questions for the curve below,which is created via the code:
 Curve[9sin(2t) + 5sin(3t), 9cos(2t)  5cos(3t), t, 0, 6.28319]
1. how to fill the closed region by the curve with solid color? the normal operation failed as indicated in the figure;
2. Is there Geogebra builtin functions which can help determine whether an arbitrarily given point is inside the closed pentacle region or not since it is not a convex region?
Files:
20150602 173...
 GeoGebra
 Help
 Partners

Contact us
 Feedback & Questions
 This email address is being protected from spambots. You need JavaScript enabled to view it.
 +43 677 6137 2693
© 2021 International GeoGebra Institute
I think you first have to find the coordinates of the five intersection points of the curve.
So it will be necessary to resolve x(t1)=x(t2) & y(t1) = y(t2).
Maybe with some trigonometric formulas.
I don't know if GeoGebra can bring some approximations.
Hi,
with
B=PointPlusProche[a, A]
b = Distance[(0, 0), A] ≤ Distance[(0, 0), B] = IsInRegion[A, a]
https://ggbm.at/1389267
with 2 curves...
https://ggbm.at/1389269
This method bring a false answer if B is inside one of the 5 branchs
and more near the central pentagon than the exterior curve of this branch.
See IsinRegionfalse figure.
We can also fill the central almost pentagon by calculate the coordinates of the intersection points.
By zooming it's easy to approximate those coordinates.
I find t1 =3.680316 and t2 = 3.859508
Then i draw the curve between t1 and t2,
and rotate it 72°, 4 times.
You can see that the curve is a little bit inside the exact regular pentagon,
so just draw it and fill it.
https://ggbm.at/1389275
https://ggbm.at/1389277
In fact it's not necessary to solve an equation to find coordinates of the intersection points :
A(0,5) it's one of those points !
But this solution is not really one because the regular pentagon is more large
than the central region of the curve.
https://ggbm.at/1389281
Hi,
:flushed: Yes , you right !
An other way, with intersect...
https://ggbm.at/1389285
Yes beautiful
hello
but the problem continues in axis of symmetry near the inside pentagon
why is the intersection of curve and ray undefined? there is a bug?
saludos
The exact region of curved pentagon is too hard to be defined in a parametric curve, so the problem may be solved by assuming linear the pentagon sides, i.e. y(M)= y(F)= 2, instead of 2.02254.
Cheers
https://ggbm.at/1389301
https://ggbm.at/1389301
Oh my god ! Incredible
I don't find any reason of this problem. A bug ?
How GeoGebra calculate the intersection of two curves ?
Because the problem clearly happened when the line is orthogonal to the tangent of the curve
at the intersection point.
I try with the regular trifolium, same.
This this case numerically (as the curve is not a polynomial) so it can't guarantee to get all the intersection points
I found part of the solution : there's no intersection between the line and the curve
because O=(0,0) is on the line. But i don't know why this belonging cause that.
See figure AsurAxe : intersection sometimes doesn't exist
(i reduce T interval for problem simplification and cause elimination)
On figure AsurAxe+décentré : intersection is here
https://ggbm.at/1389315
https://ggbm.at/1389315
https://ggbm.at/1389317
in fact ther'es no intersection because O is on the halfline which cut the curve.
the intersection between the entire line (name e on figure AsurAxe) and the curve
exist on figure AsurAxe
J’ai ramené le problème à ce qui suit :
Sur la figure suivante, la courbe a est un cercle de centre (0,c) tracée de façon paramétrique.
B est un point quelconque du plan, C le point de a le plus proche de B.
Si c est différent de 0, l’autre intersection (E) de (DB) avec le cercle existe, quand on déplace B, la moitié du temps uniquement (pour un demicercle. Vous pouvez construire l’intersection avec l’autre demicercle sans problème. En fait tout se passe comme si il y avait non pas 1 courbe, mais 2).
Si c = 0 (c’est à dire quand la droite passe par (0,0)), cette intersection n’existe pas, pour la plupart des positions de B. Mais des fois elle apparaît furtivement.
Il n’y a pas ce problème avec un cercle tracé avec la commande Cercle.
https://ggbm.at/1389323
hello
to model the inside command for a point with an aprox polygon is easy
I did an applet in June of 2009 for a course of INTE (instituto nacional de tecnologias educativas del ministerio de educacion en España)
the course was absurdly eliminated off menu of INTE's courses
but you can acces to material in
http://www.ite.educacion.es/formacion/materiales/123/cd/06/otros.html and another pages
my applet is at bottom of the page. you can translate the text with google.
then I wanted a similar method for parametric curve
the calculus is slow in my machine but it works well
and it is amazing (I think so)
test it please (points in special positions are interesting)
saludos
WARNING:
the PC may freeze and CPU can be heated
https://ggbm.at/1389325
https://ggbm.at/1389327
I can't open your figure in the site /ite.educacion.es/
Does here in GeoGebraTube ?
You use a topology method ant the result is really great ! Thanks.
Is you definition of "degree" (integral of ((f(x)  x(A)) dg(x)  (g(x)  y(A)) df(x)) / ((f(x)  x(A))² + (g(x)  y(A))²)
between 0 and 2pi) means something else first in topology ?
Maybe it's also possible to calculate some others topologic indicators curve, as genre for example ?
In figure foro1, i see when A is (0,2)? Does exist a additional way to conclude that A is inside ?
Have a good day
saludos
PD: lo he bajado y te lo subo
note than the version in 2009 is very old
https://ggbm.at/1389329
what "A is inside" means? is not possible a path joining the point with a remote point or there is a sub_curve around the point? is the point in a laberynth inside or outside? both cases seems to me not possible actually for GG
Ah! integral of ((f(x)  x(A)) dg(x)  (g(x)  y(A)) df(x)) / ((f(x)  x(A))² + (g(x)  y(A))² is the sum of infinity signed angles from curve to point
saludos
hello
a completely new method. integral is eliminated by another angular calculus and the calculus is faster simpler
the degree of curve is more clear. the points on curve is not supported but if you want it no problem
new example
change f and g for older examples
please test it
saludos
PD: if you like the course of inte you can donwload the applet changing html in link by ggb. example
you want see http://www.ite.educacion.es/formacion/materiales/123/cd/html/circ_p.html and java avoids you
then download
http://www.ite.educacion.es/formacion/materiales/123/cd/ggb/circ_p.ggb
podriamos enviar peticiones al [size=150]INTE [/size]para que recuperen los [size=150]cursos [/size]de [size=200]GeoGebra[/size]
saludos
https://ggbm.at/1389333
I test it and other too and it's really great.
Calculus faster simpler for this one ? Maybe not if you don't know the formula use in code :
sgn((u  A) ⊗ v), u, a(raices), v, da(raices)
where raices are Racines[p]
and p = atan2(g(x)  y(A),f(x)  x(A))...
Beautiful that it's possible to replace a integral by a finite sum extended to some roots.
(it's always possible?)
For that moment i translate the text of your first area polygon figure (thanks for the upload!)
because Google traduction is not very good..
If GeoGebra give a false polygone area, does exist a way to have the true ?
(maybe by changing weighted coefficient of the sum ?)
It's too bad that Patrick's method for the pentagram curve to decide even if or not a point is inside fail,
because it should work! GeoGebra programs for computate roots must be more effective.
In that point of view, the figure in my last post reveal how large is the problem :cry:
Hello,
@ mathmagic :
very interesting! Bravo and thank you.
si tu quieres puedo darte el proceso mental seguido para el calculo inicial y el cambio producido en el proceso
basicamente es que la integral inicial era la integral de una derivada
pero la explicacion te la puedo dar en español
mi ingles no llega a tanto
saludos
Your explanation isnt too long (less than two pages) ? If yes, i want it.
I have a solution for Patrick’s method.
Let a : x = f(t) & y = g(t) the curve.
We first find the roots of : df(t) (x(A)  f(t)) + dg(t) (y(A)  g(t)) = 0.
Those solutions T correspond to the points a(T) of the curve where the normal passes through the point A.
Then it’s easy to have the point of the curve which is the closest to A (name B).
After, by solving an other classic equation, you can have all the intersection of the curve with the normal at B (*).
For finish, some of those points M must be eliminate : when B is on [AM] (with for example a geometric logic code).
(*) those two equations must be simplified before being input, otherwise GeoGebra partially solved them. Maybe that’s why some other figures fails.
https://ggbm.at/1389335
Interesting approach, the above one.
As shown below, I've tried to replicate it in a generalized form and have no idea why list3 produces only one output and minvalue is undefined.
Please, Patrick/Rousseau (coauthors of the sheet), could you amend mine appropriately?
Thx&Cheers
https://ggbm.at/1389351
Hi,
because Sequence get a list, no use {....} in {Sequence[...]}
same problem with Zip[...]
...
https://ggbm.at/1389353
So precious drift, Patrick! Now I can proceed to complete the sheet,
Thank you very much and cheers
I still need help.
The definition of p(x) seems in accordance with the original sheet, nevertheless errors erupt, as show. Thx in advance
https://ggbm.at/1389357
I'm afraid it's impossible to generalize.
Look graphs function of h and p.
When you move A, GeoGebra can't find all roots of those functions.
I don't know if is the reason of your last figure error, but it's certain that this failure prevent to finish.
If you want to complete the figure you need to simplified the expression of h and p
before input them in GeoGebra.
It's possible with the formula sin(a + b) = sin(a)cos(b) + sin(b)cos(a).
Yes, Rousseau, the att'd screenshot of comparison confirms the different behaviour of both sheets: yours and mine.
Unfortunately the loss of generalization strongly reduces the superb method of investigation: point inside/outside the given contour of a parametric curve.
Thanks a lot for your cooperation
Comments have been locked on this page!