private Vertex3f morph(double reductionCoefficient, Vertex3f original) {
		Vertex3f point = new Vertex3f(0, 0, 0);
		int index = 3;
		double dist, angleBase;
		double xInd, yInd, zInd;
		double xInd2, yInd2, zInd2;
		/* determines on which segment we are */
		if (original.getY() < yOffset) {
			index = 0;
		} else if (original.getY() < yOffset + legLengths[0]) {
			index = 1;
		} else if (original.getY() < yOffset + legLengths[0] + legLengths[1]) {
			index = 2;
		}
		/* Below origin = all written on origin, so it would be a dot */
		if (index == 0)
			return reduced(point, reductionCoefficient);

		/* First Segment - independent movement of anglesRad[0] */
		if (index == 1) {
			dist = Math.sqrt(Math.pow(original.y - yOffset, 2)
					+ Math.pow(original.x, 2));
			/* from -90 degree to 90 degree, and result is in radiant */
			angleBase = Math.asin(original.x / dist);
			point.z = original.z;
		} else {
			dist = legLengths[0];
			angleBase = 0;
			point.z = 0;
		}
		point.x += dist * Math.sin(angleBase + anglesRad[0]);
		point.y += dist * Math.cos(angleBase + anglesRad[0]);
		if (index == 1)
			return reduced(point, reductionCoefficient);

		/* Second Segment - independent movement of anglesRad[1] */
		if (index == 2) {
			dist = Math.sqrt(Math.pow(original.y - yOffset - legLengths[0], 2)
					+ Math.pow(original.z, 2));
			angleBase = Math.asin(original.z / dist);
			xInd = original.x;
		} else {
			dist = legLengths[1];
			angleBase = 0;
			xInd = 0;
		}
		yInd = dist * Math.cos(angleBase + anglesRad[1]);
		zInd = dist * Math.sin(angleBase + anglesRad[1]);
		/* axes rotation on y of anglesRad[0] with translation */
		point.x += xInd * Math.cos(anglesRad[0]) + yInd
				* Math.sin(anglesRad[0]);
		point.y += yInd * Math.cos(anglesRad[0]) - xInd
				* Math.sin(anglesRad[0]);
		point.z += zInd;
		if (index == 2)
			return reduced(point, reductionCoefficient);

		/* Third Segment - independent movement of anglesRad[2] */
		dist = Math.sqrt(Math.pow(original.y - yOffset - legLengths[0]
				- legLengths[1], 2)
				+ Math.pow(original.z, 2));
		angleBase = Math.asin(original.z / dist);
		xInd = original.x;
		yInd = dist * Math.cos(angleBase + anglesRad[2]);
		zInd = dist * Math.sin(angleBase + anglesRad[2]);
		/* axes rotation on z of anglesRad[1] */
		xInd2 = xInd;
		yInd2 = yInd * Math.cos(anglesRad[1]) - zInd * Math.sin(anglesRad[1]);
		zInd2 = zInd * Math.cos(anglesRad[1]) + yInd * Math.sin(anglesRad[1]);
		/* axes rotation on y of anglesRad[0] with translation */
		point.x += xInd2 * Math.cos(anglesRad[0]) + yInd2
				* Math.sin(anglesRad[0]);
		point.y += yInd2 * Math.cos(anglesRad[0]) - xInd2
				* Math.sin(anglesRad[0]);
		point.z += zInd2;
		return reduced(point, reductionCoefficient);
	}