I have a code that generates mountain shapes for 10 different 3d maps covering an entire graph, then i delete 90 percent of each map and mix the rest into a final map with a variety of mountain shapes. Therefore processor useage is 9 times inefficent! The code can make infinite variety of basic shapes and mixes.

The graphics engine asks height information for X,Y, and the code returns Z using sine functions.

graph axes X and Y are Floats in the range -1,1.

How can make variables new_X and new_Y that are only segments of X,Y, So that i can code sin(new_X)*sin(new_Y), and it will calculate mountains only in the ranges that will be visible in the final map? for example new_X would be a segment of X in the range (-0.1,0.2) that exists on the X variable.