is it possible to trace only inside an area?

suadoni shared this question 3 years ago
Answered

hello there.

Take this, for instance: https://www.geogebra.org/cl...

I'd like it to be "contained" inside a box - let's say -2<x<2, 0<y<4 - and off white outside.

In general, can I use tracing to fill a polygon or a circle?

Thanks for your help

Comments (5)

photo
1

I would work with two points. First a free draggable point A, then a second point AA = A. You can show the trace of AA (not of A) and in the condition to show AA fill in the area which you want to fill in. So while dragging A the trace (of AA) will just fill in the defined area.

chris

photo
1

There are various ways to do it. Maybe this is the easiest (white rectangle with inverse fill in a higher layer)https://www.geogebra.org/m/A71fBM86

photo
1

could be like the file

potrebbe essere comeil file

photo
1

You have a animated <line> and a <area> (polygon, conic, etc.). This 2 object intersect in 0..n points (l1)

Always complete pairs (l2) of these points builds Segments (l3), which lie within the <area>.

There are 0..n segments depending on the situation, which are advantageously kept in a list (l3).

This list (l3) is given the property Trace.

.

l1 = RemoveUndefined({Intersect(<line> <area>)})

l2 = First(l1, floor(Length(l1) / 2) * 2)

l3 = Sequence(Segment(l2(n), l2(n + 1)), n, 1, Length(l2) - 1, 2)

photo
1

thank you all for the contributions

© 2023 International GeoGebra Institute