1
$\begingroup$

I am trying to take intersections of several three-dimensional regions by using the regionplot3d command. Currently thinking about how to use looping to take intersections for several 3-D regions.

RegionPlot3D[
x - 2*(A/8)^(i) - p^(i)*(y + z) < 0 &&
x + (A/8)^(i) - p^(i)*(y + z) > 0, {x, -2, 2}, {y, -2, 2}, {z, -2,
2}, Mesh -> None, PlotPoints -> 100]

The region after taking $i = 4,5,6,...,20$

any idea of looping? $A =3, p =0.5$

$\endgroup$
3
  • 1
    $\begingroup$ A = 3; p = .5; RegionPlot3D[ And @@ Table[ x - 2*(A/8)^(i) - p^(i)*(y + z) < 0 && x + (A/8)^(i) - p^(i)*(y + z) > 0, {i, 4, 20}], {x, -5, 5}, {y, -5, 5}, {z, -5, 5}] It seems that only tiny region left. $\endgroup$
    – cvgmt
    Oct 21 '20 at 5:29
  • $\begingroup$ Cool! I will have a look at the Table command used! $\endgroup$
    – BAYMAX
    Oct 21 '20 at 5:31
  • 1
    $\begingroup$ You can also use RegionIntersection @@ Table[ImplicitRegion[x-2*(A/8)^(i)-p^(i)*(y+z)<0&&x+(A/8)^(i)-p^(i)*(y+z)>0, {x,y,z}], {i,4,20}] to construct a region that matches your needs. $\endgroup$ Oct 21 '20 at 10:39
2
$\begingroup$
A = 3;
p = .5;
RegionPlot3D[  And @@ Table[x - 2*(A/8)^(i) - p^(i)*(y + z) < 0 && x + (A/8)^(i) - p^(i)*(y + z) > 0, {i, 4, 20}], {x, -5,5}, {y, -5, 5}, {z, -5, 5}]

If we use Reduce,we can get some results.

A = 3;
p = 1/2;
sol=Reduce[And @@ 
  Table[x - 2*(A/8)^(i) - p^(i)*(y + z) < 0 && 
    x + (A/8)^(i) - p^(i)*(y + z) > 0, {i, 4, 20}], Reals]
sol=((-17692202331 - 1099511627776 z)/1099511627776 < 
    y <= (-1937102445 - 137438953472 z)/
    137438953472 && (-3486784401 + 1099511627776 y + 1099511627776 z)/
    1152921504606846976 < x < (
    387420489 + 34359738368 y + 34359738368 z)/
    9007199254740992) || ((-1937102445 - 137438953472 z)/
    137438953472 < y <= (-5811307335 - 549755813888 z)/
    549755813888 && (-3486784401 + 1099511627776 y + 1099511627776 z)/
    1152921504606846976 < x < (
    1162261467 + 137438953472 y + 137438953472 z)/
    72057594037927936) || ((-5811307335 - 549755813888 z)/
    549755813888 < y <= (5811307335 - 1099511627776 z)/
    1099511627776 && (-3486784401 + 1099511627776 y + 
     1099511627776 z)/1152921504606846976 < x < (
    3486784401 + 549755813888 y + 549755813888 z)/
    576460752303423488) || ((5811307335 - 1099511627776 z)/
    1099511627776 < y <= (1937102445 - 274877906944 z)/
    274877906944 && (-1162261467 + 274877906944 y + 274877906944 z)/
    144115188075855872 < x < (
    3486784401 + 549755813888 y + 549755813888 z)/
    576460752303423488) || ((1937102445 - 274877906944 z)/
    274877906944 < y <= (645700815 - 68719476736 z)/
    68719476736 && (-387420489 + 68719476736 y + 68719476736 z)/
    18014398509481984 < x < (
    3486784401 + 549755813888 y + 549755813888 z)/
    576460752303423488) || ((645700815 - 68719476736 z)/68719476736 < 
    y < (36546666129 - 3848290697216 z)/
    3848290697216 && (-129140163 + 17179869184 y + 17179869184 z)/
    2251799813685248 < x < (
    3486784401 + 549755813888 y + 549755813888 z)/576460752303423488)

And we can test the solution which provided by @UlrichNeumann

sol/. {x -> 0, y -> c, z -> -c} // Simplify
(* True *)
RegionPlot3D[sol, {x, -.1, .1}, {y, -.1, .1}, {z, -.1, .1}]

enter image description here

$\endgroup$
4
  • $\begingroup$ Mathematica v12 only plots some points as resulting region. The resulting region should be x==0 &&y==-z I think. $\endgroup$ Oct 21 '20 at 9:23
  • $\begingroup$ @UlrichNeumann, Yes, sol /. {x -> 0, y -> c, z -> -c} // Simplify means that this is one of the solution but not all the solution. $\endgroup$
    – cvgmt
    Oct 21 '20 at 10:39
  • 1
    $\begingroup$ Ok, but my question concerns the resulting regionplot in your answer. Mathematica v12 only shows some points! That's quite unexpected because RegionPlot3D usually shows 3D subregions. Please show your resulting plot. Thanks! $\endgroup$ Oct 21 '20 at 10:50
  • $\begingroup$ @UlrichNeumann Thanks, I have already updated. $\endgroup$
    – cvgmt
    Oct 21 '20 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.