Message Boards Message Boards

0
|
410 Views
|
7 Replies
|
1 Total Likes
View groups...
Share
Share this post:

3DPlot is coming out empty

Posted 1 month ago
PValue = 1;
RValue = 1;
{x0Value, y0Value, z0Value} = {28, 5, 20};
kValue = 1;
{nValue, mValue, lValue} = {1, 1, 1};
dValue = 2;

(*Определение функции c*)
cFunction[x_, y_, z_, kk_] := ((x - kk)/(x - x0Value))*
  Sqrt[(x - x0Value)^2 + (y - y0Value)^2 + (z - z0Value)^2]

(*Определение уравнения*)
equationFunction[x_, y_, z_, x0_, y0_, z0_] := P*R^2*\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(x = kValue\), \(kValue + nValue\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(y = lValue\), \(mValue\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(z = 
       lValue\), \(lValue\)]\((\((1/\((\((x - x0)\)^2 + \((y - 
              y0)\)^2 + \((z - z0)\)^2)\)*\((
\*SuperscriptBox[\(2\), \(c/d\)])\))\))\)\)\)\)

(*Построение 3D-графика*)
Plot3D[equationFunction[x, y, z, x0Value, y0Value, z0Value, dValue, 
  cFunction, PValue, RValue], {x, -10, 20}, {y, -10, 20}, 
 PlotRange -> All, AxesLabel -> {"x", "y", "Intensity"}, 
 PlotLabel -> "3D модель"]

Initially, there was a schedule, but then for some reason it disappeared. Changed the original data, reworked the equations, but later gives an error in the form of problems with iteration. Tell me, what could be the reason?

Attachment

POSTED BY: Alex Dark
7 Replies
Posted 1 month ago

Hello, Alex! Firstly, parameters P, R, c, d are not defined in this part of code!
Secondly, Plot3D use only two coordinates: x, y, so this code should be corrected.
But firstly you have to define P, R, c, d and than I could help you.

POSTED BY: Denis Ivanov
Posted 1 month ago

Why? I described such values as PValue and cFunction. All this data is present. I tried to move everything to P R c d k and so on, but the same problem.

POSTED BY: Alex Dark
Posted 1 month ago

Hi. Here are the changes. As you can see, the schedule has stopped working.

Attachment

POSTED BY: Alex Dark
Posted 1 month ago

Dear Alex, this is much better attached notebook, not screenshot!
At least text of full code.
For now:
1. cFunction inside equationFunction should have arguments
2. And what argument of equationFunction pass to cFunction as kk?

POSTED BY: Denis Ivanov
Posted 1 month ago

I'd love to, but I don't understand how to do it. Now I'll send the material, it will probably work. kk_ is the value of kValue. Can you tell me more about cFunction's arguments?

ucan describe or russian if u want.

POSTED BY: Alex Dark

When you write

Plot3D[equationFunction[x, y, z, x0Value, y0Value, z0Value, dValue, 
    cFunction, PValue, RValue]...

what is the value of cFunction?

POSTED BY: Gianluca Gorni
Posted 1 month ago

The value was based on the original data that I described from above

POSTED BY: Alex Dark
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract