Hello! Help me please to draw a graph of the results of my procedure in 3D . The procedure displays a graph of the function Sin[x] and rectangles on it and Ln [y] and rectangles on it . I need to print a sum of procedsure's results of Sin[x] and Ln[y] in 3D, then these rectangles should be parallelepipeds.
spxsin = {-1, -0.35, 0.3, 0.95, 1.6, 2.375, 3.15, 3.925, 4.7, 5.025,
5.35, 5.675, 6};
spxlny = {1, 2.25, 3.5, 4.75, 6};
operation[value_, f_, a_, b_] := Block[{data},
data = Table[{x, f[x]}, {x, a, b, 0.1}];
Graphics[{Thick, Blue, Line[data],
Green,
Table[Point[{value[[i]], f[value[[i]]]}], {i, 1, Length[value]}],
Pink, Opacity[.7],
Table[Rectangle[{value[[i]], f[value[[i]]]}, {value[[i + 1]],
f[value[[i + 1]]]}], {i, 1, Length[value] - 1}]
}, Axes -> True]]
operation[spxsin, Sin, -1, 6]
operation[spxlny, Log, 1, 6]
I've tried to do it :
Plot3D[{operation[spxsin, Sin, -1, 6] + operation[spxlny, Log, 1, 6]}, {spxsin, -1, 6}, {spxlny, 1, 6}]
or
Plot3D[{operation[spxsin, Sin, -1, 6] + operation[spxlny, Log, 1, 6]}, {x, -1, 6}, {y, 1, 6}]
but it doesn't work:(