# RegionPlot3D error:  Incomplete expression; more input is needed

**URL:** <https://community.wolfram.com/t/regionplot3d-error-incomplete-expression-more-input-is-needed/21246>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [December 21, 2022, 12:55pm UTC](https://community.wolfram.com/t/regionplot3d-error-incomplete-expression-more-input-is-needed/21246 "2022-12-21T12:55:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajaykumarsahu0505](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@ajaykumarsahu0505](https://community.wolfram.com/u/ajaykumarsahu0505)\
**Post date:** [December 21, 2022, 12:55pm UTC](https://community.wolfram.com/t/regionplot3d-error-incomplete-expression-more-input-is-needed/21246/1 "2022-12-21T12:55:21Z")

</div>

I am new to this programming language and want to run the following set of code to make a region 3D plot of surface structure based on the contour data points as per the image shown below. For this, I am taking the point for the contour, inner surface, and background and assigning it to the set so variable. but the code is showing an error as Syntax::sntxi: Incomplete expression; more input is needed.

```
imag =

```

 ![Contour.png](https://global.discourse-cdn.com/wolfram/original/3X/d/4/d4d3dfe56da9774d3782eb589db53e2e9aad9ac7.png)  
;  
wid = ImageDimensions[imag][[1](https://community.wolfram.com//c/portal/getImageAttachment?filename=Contour.png&userId=2740757)];  
len = ImageDimensions[imag][[2](https://community.wolfram.com//c/portal/getImageAttachment?filename=Inner.png&userId=2740757)];  
t = 1;  
For[i = 1, i \<= wid, i++,  
For[j = 1, j \<= len, j++, p[i, j] = PixelValue[imag, {i, j}][[1](https://community.wolfram.com//c/portal/getImageAttachment?filename=Contour.png&userId=2740757)];  
If[p[i, j] == 1, {x1[t] = i; x2[t] = j; t++}]]]  
t = t - 1;

```
imag =

```

 ![Inner.png](https://global.discourse-cdn.com/wolfram/original/3X/6/a/6a3e1eb4bdec31cb1134bcdfed40958e4008eb43.png)  
;  
wid = ImageDimensions[imag][[1](https://community.wolfram.com//c/portal/getImageAttachment?filename=Contour.png&userId=2740757)];  
len = ImageDimensions[imag][[2](https://community.wolfram.com//c/portal/getImageAttachment?filename=Inner.png&userId=2740757)];  
pt = 1;  
For[i = 1, i \<= wid, i++,  
For[j = 1, j \<= len, j++, p[i, j] = PixelValue[imag, {i, j}][[1](https://community.wolfram.com//c/portal/getImageAttachment?filename=Contour.png&userId=2740757)];  
If[p[i, j] == 1, {px1[pt] = i; px2[pt] = j; pt++}]]]  
pt = pt - 1;

```
imag =

```

 ![Background.png](https://global.discourse-cdn.com/wolfram/original/1X/a3b326429b8563dfc0e083ea5b8b7b23a219d375.png)  
;  
wid = ImageDimensions[imag][[1](https://community.wolfram.com//c/portal/getImageAttachment?filename=Contour.png&userId=2740757)];  
len = ImageDimensions[imag][[2](https://community.wolfram.com//c/portal/getImageAttachment?filename=Inner.png&userId=2740757)];  
gt = 1;  
For[i = 1, i \<= wid, i++,  
For[j = 1, j \<= len, j++, p[i, j] = PixelValue[imag, {i, j}][[1](https://community.wolfram.com//c/portal/getImageAttachment?filename=Contour.png&userId=2740757)];  
If[p[i, j] == 1, {gx1[gt] = i; gx2[gt] = j; gt++}]]]  
gt = gt - 1;

```
k = 0.01;
RegionPlot3D[
 (Cos[0.2 x] Cos[0.2 y] Cos[0.2 z] - 
      Sin[0.2 x] Sin[0.2 y] Sin[0.2 z] + 0.1) (
\!\(\*UnderscriptBox[
OverscriptBox[\(\[Sum]\), \(t\)], \(i = 1\)]\) 
      Exp[-k ((x - x1[i])^2 + (y - x2[i])^2)]) + (Cos[0.2 x] Sin[
        0.2 y] + Cos[0.2 y] Sin[0.2 z] + Cos[0.2 z] Sin[0.2 x] - 
      0.59) (
\!\(\*UnderscriptBox[
OverscriptBox[\(\[Sum]\), \(pt\)], \(i = 1\)]\) 
      Exp[-k ((x - px1[i])^2 + (y - px2[i])^2)]) - (
\!\(\*UnderscriptBox[
OverscriptBox[\(\[Sum]\), \(gt\)], \(i = 1\)]\) 
     Exp[-k ((x - gx1[i])^2 + (y - gx2[i])^2)]) >= 0, {x, 0, wid}, {y,
   0, len}, {z, 0, 100}, PlotRange -> All, Mesh -> False, 
 Axes -> False, Boxed -> False, PlotPoints -> 50, 
 PlotStyle -> Directive[Specularity[White, 1], Opacity[1], Blue], 
 BoxRatios -> Automatic]

```

I wanted an output as follow :

 ![image.jpg](https://global.discourse-cdn.com/wolfram/original/3X/8/b/8bbc4631016c60ccdae9363483dc5b7867a57ef3.jpeg)

Please help me identify the problem…

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [December 21, 2022, 3:51pm UTC](https://community.wolfram.com/t/regionplot3d-error-incomplete-expression-more-input-is-needed/21246/2 "2022-12-21T15:51:19Z")

</div>

I have not looked through all of the code, but the first line is incorrect syntax, try evaluating

```
imag = ! [Contour][1]

```

Try removing all of the terminating `;` and evaluating each expression to verify that the result is as expected. If you are new to the language a good resource for learning is Stephen Wolfram’s book An Elementary Introduction to the Wolfram Language which is available [online](https://www.wolfram.com/language/elementary-introduction/2nd-ed/) for free. You should also read [this](https://www.wolfram.com/language/fast-introduction-for-programmers/en/).

---

<div class="post-metadata">

**Author:** ![ajaykumarsahu0505](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@ajaykumarsahu0505](https://community.wolfram.com/u/ajaykumarsahu0505)\
**Post date:** [December 23, 2022, 4:58am UTC](https://community.wolfram.com/t/regionplot3d-error-incomplete-expression-more-input-is-needed/21246/3 "2022-12-23T04:58:57Z")

</div>

Thanks Rohit, the program got executed..
