From: Jean-Philippe Bruyère Date: Sun, 22 Jun 2025 10:06:15 +0000 (+0200) Subject: unified samples app in c++, unit testing wip X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=0ca30a2d019ec31459a571dd82a36dad140df49b;p=jp%2Fvkvg.git unified samples app in c++, unit testing wip --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fe84d3..dc68ae0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -224,6 +224,7 @@ IF(GLSLC AND XXD) GET_FILENAME_COMPONENT(SPV ${shad_spv} NAME) ADD_CUSTOM_COMMAND ( TARGET BuildShadersHeader + PRE_BUILD WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${SHADER_DIR} COMMAND ${XXD} -i ${SPV} >> ${SHADERS_H} ) @@ -328,6 +329,7 @@ INSTALL(TARGETS "${PROJECT_NAME}" "${PROJECT_NAME}" IF (VKVG_BUILD_TESTS) ADD_SUBDIRECTORY(tests) + ADD_SUBDIRECTORY(samples) ELSEIF (VKVG_BUILD_OFFSCREEN_TEST) ADD_EXECUTABLE(test_offscreen "${CMAKE_CURRENT_SOURCE_DIR}/tests/offscreen.c") TARGET_INCLUDE_DIRECTORIES(test_offscreen PRIVATE diff --git a/gunit_tests/drawTestBase.cpp b/gunit_tests/drawTestBase.cpp index 2fdc9c5..018132d 100644 --- a/gunit_tests/drawTestBase.cpp +++ b/gunit_tests/drawTestBase.cpp @@ -67,7 +67,7 @@ void DrawTestBase::compareWithRefImage() { if (totDiff > 0) { fs::path diffPath = diffDir / ::testing::UnitTest::GetInstance()->current_test_info()->name(); - targetPath.replace_extension(".png"); + diffPath.replace_extension(".png"); stbi_write_png((char*)diffPath.c_str(), (int32_t)w, (int32_t)h, 4, diffImg, (int32_t)(4 * w)); } diff --git a/gunit_tests/imageDraw.cpp b/gunit_tests/imageDraw.cpp index c327f27..23df904 100644 --- a/gunit_tests/imageDraw.cpp +++ b/gunit_tests/imageDraw.cpp @@ -3,7 +3,7 @@ class ImageDrawTest : public DrawTestBase { protected: - fs::path imgPath = fs::path(GTEST_DATA_ROOT) / "miroir2.png"; + fs::path imgPath = fs::path(GTEST_DATA_ROOT) / "mirror2.png"; VkvgSurface imgSurf; void SetUp() override { @@ -100,7 +100,7 @@ TEST_F(ImageDrawTest, PaintImageTransform) { vkvg_set_source_rgb(ctx, 0.5f, 0.5f, 0.5f); vkvg_paint(ctx); - fs::path imgPath = fs::path(GTEST_DATA_ROOT) / "miroir2-64.png"; + fs::path imgPath = fs::path(GTEST_DATA_ROOT) / "mirror2-64.png"; VkvgSurface imgSurf = vkvg_surface_create_from_image(dev, (char*)imgPath.c_str()); vkvg_translate(ctx, 10, 10); diff --git a/gunit_tests/patternDraw.cpp b/gunit_tests/patternDraw.cpp index e550340..9af9fc5 100644 --- a/gunit_tests/patternDraw.cpp +++ b/gunit_tests/patternDraw.cpp @@ -3,7 +3,7 @@ class PatternDrawTest : public DrawTestBase { protected: - fs::path imgPath = fs::path(GTEST_DATA_ROOT) / "miroir2.png"; + fs::path imgPath = fs::path(GTEST_DATA_ROOT) / "mirror2.png"; VkvgSurface imgSurf; void SetUp() override { diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt new file mode 100644 index 0000000..1e31316 --- /dev/null +++ b/samples/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.14) +project(samples) + +# GoogleTest requires at least C++14 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +include(FetchContent) + +FetchContent_Declare( + argparse + GIT_REPOSITORY https://github.com/p-ranav/argparse + GIT_TAG 3eda91b2e1ce7d569f84ba295507c4cd8fd96910 #v3.2 +) + +FetchContent_MakeAvailable(argparse) + +set(SAMPLES_DATA_ROOT "${CMAKE_SOURCE_DIR}/tests/data" CACHE STRING "Data path for samples") + +file(GLOB SAMPLES_SRC "*.cpp" "tests/*.cpp") + +add_executable("${PROJECT_NAME}" ${SAMPLES_SRC}) + +target_compile_definitions("${PROJECT_NAME}" PUBLIC + SAMPLES_DATA_ROOT="${GTEST_DATA_ROOT}" +) +target_include_directories("${PROJECT_NAME}" PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_SOURCE_DIR}/include" + ${GLFW3_INCLUDE_DIR} + ${Vulkan_INCLUDE_DIRS} + "${CMAKE_SOURCE_DIR}/vkh/include" + "${CMAKE_SOURCE_DIR}/vkh/src" +) +target_link_libraries("${PROJECT_NAME}" + vkvg + ${Vulkan_LIBRARIES} + ${GLFW3_LIBRARY} + argparse +) + + + + + diff --git a/samples/SampleApp.cpp b/samples/SampleApp.cpp new file mode 100644 index 0000000..392c446 --- /dev/null +++ b/samples/SampleApp.cpp @@ -0,0 +1,253 @@ +#include +#include + +#include "vkvg.h" +#include "vkh.h" +#include "vkh_phyinfo.h" + +#include + +#include "SampleApp.hpp" +#include "VkvgTest.hpp" + + + +bool SampleApp::try_get_phyinfo(VkhPhyInfo *phys, uint32_t phyCount, VkPhysicalDeviceType gpuType, VkhPhyInfo *phy) { + for (uint32_t i = 0; i < phyCount; i++) { + if (phys[i]->properties.deviceType == gpuType) { + *phy = phys[i]; + return true; + } + } + return false; +} + +static void glfw_error_callback(int error, const char *description) { + fprintf(stderr, "vkengine: GLFW error %d: %s\n", error, description); +} +void SampleApp::key_callback(GLFWwindow *window, int key, int scancode, int action, int mods) { + if (action != GLFW_PRESS) + return; + switch (key) { + case GLFW_KEY_SPACE: + //paused = !paused; + break; + case GLFW_KEY_ESCAPE: + glfwSetWindowShouldClose(window, GLFW_TRUE); + break; + } +} +static void char_callback(GLFWwindow *window, uint32_t c) {} +static void mouse_move_callback(GLFWwindow *window, double x, double y) {} +static void scroll_callback(GLFWwindow *window, double x, double y) {} +static void mouse_button_callback(GLFWwindow *window, int but, int state, int modif) {} + + +void SampleApp::Init() { + glfwSetErrorCallback(glfw_error_callback); + + if (!glfwInit()) { + perror("glfwInit failed"); + exit(-1); + } + + if (!glfwVulkanSupported()) { + perror("glfwVulkanSupported return false."); + exit(-1); + } + const char *enabledLayers[10]; + const char *enabledExts[10]; + uint32_t enabledExtsCount = 0, enabledLayersCount = 0, phyCount = 0; + + vkh_layers_check_init(); +#ifdef VKVG_USE_VALIDATION + if (vkh_layer_is_present("VK_LAYER_KHRONOS_validation")) + enabledLayers[enabledLayersCount++] = "VK_LAYER_KHRONOS_validation"; +#endif +#ifdef VKVG_USE_MESA_OVERLAY + if (vkh_layer_is_present("VK_LAYER_MESA_overlay")) + enabledLayers[enabledLayersCount++] = "VK_LAYER_MESA_overlay"; +#endif + +#ifdef VKVG_USE_RENDERDOC + if (vkh_layer_is_present("VK_LAYER_RENDERDOC_Capture")) + enabledLayers[enabledLayersCount++] = "VK_LAYER_RENDERDOC_Capture"; +#endif + vkh_layers_check_release(); + + uint32_t glfwReqExtsCount = 0; + const char **gflwExts = glfwGetRequiredInstanceExtensions(&glfwReqExtsCount); + + vkvg_get_required_instance_extensions(enabledExts, &enabledExtsCount); + + for (uint32_t i = 0; i < glfwReqExtsCount; i++) + enabledExts[i + enabledExtsCount] = gflwExts[i]; + + enabledExtsCount += glfwReqExtsCount; + + app = vkh_app_create(1, 2, "vkvg", enabledLayersCount, enabledLayers, enabledExtsCount, enabledExts); + +#if defined(DEBUG) && defined(VKVG_DBG_UTILS) + uint32_t severity = 0; + for(const uint32_t& s : logSeverity) + severity += pow(16, s); + + vkh_app_enable_debug_messenger(app, + (VkDebugUtilsMessageTypeFlagBitsEXT)logType, + (VkDebugUtilsMessageSeverityFlagBitsEXT)severity, + NULL); +#endif + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); + glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); + glfwWindowHint(GLFW_FLOATING, GLFW_FALSE); + glfwWindowHint(GLFW_DECORATED, GLFW_TRUE); + + win = glfwCreateWindow((int)width, (int)height, "Window Title", NULL, NULL); + + glfwCreateWindowSurface(vkh_app_get_inst(app), win, NULL, &vkSurf); + + VkhPhyInfo *phys = vkh_app_get_phyinfos(app, &phyCount, vkSurf); + + if (listGpus) { + std::cout << "Available GPU's:" << std::endl; + std::cout << "================" << std::endl; + for (uint32_t i = 0; i < phyCount; i++) { + std::cout << "\t" << i << ": " << phys[i]->properties.deviceName << std::endl; + } + vkh_app_free_phyinfos(phyCount, phys); + vkDestroySurfaceKHR(vkh_app_get_inst(app), vkSurf, NULL); + glfwDestroyWindow(win); + vkh_app_destroy(app); + glfwTerminate(); + exit(0); + } + + VkhPhyInfo pi = 0; + if (gpuIndex > 0 && gpuIndex < phyCount) { + pi = phys[gpuIndex]; + } else { + if (!try_get_phyinfo(phys, phyCount, preferedGPU, &pi) && + !try_get_phyinfo(phys, phyCount, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, &pi) && + !try_get_phyinfo(phys, phyCount, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, &pi)) + pi = phys[0]; + } + assert(pi && "No vulkan physical device found."); + + memory_properties = pi->memProps; + gpu_props = pi->properties; + + uint32_t qCount = 0; + float qPriorities[] = {0.0}; + + VkDeviceQueueCreateInfo pQueueInfos[] = {{}, {}, {}}; + if (vkh_phyinfo_create_presentable_queues(pi, 1, qPriorities, &pQueueInfos[qCount])) + qCount++; + /*if (vkh_phyinfo_create_compute_queues (pi, 1, qPriorities, &pQueueInfos[qCount])) + qCount++; + if (vkh_phyinfo_create_transfer_queues (pi, 1, qPriorities, &pQueueInfos[qCount])) + qCount++;*/ + + enabledExtsCount = 0; + + if (vkvg_get_required_device_extensions(pi->phy, enabledExts, &enabledExtsCount) != VKVG_STATUS_SUCCESS) { + perror("vkvg_get_required_device_extensions failed, enable log for details.\n"); + exit(-1); + } + TRY_LOAD_DEVICE_EXT(VK_KHR_swapchain) + + VkPhysicalDeviceFeatures enabledFeatures{}; + const void *pNext = vkvg_get_device_requirements(&enabledFeatures); + + VkDeviceCreateInfo device_info = {.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, + .pNext = pNext, + .queueCreateInfoCount = qCount, + .pQueueCreateInfos = (VkDeviceQueueCreateInfo *)&pQueueInfos, + .enabledExtensionCount = enabledExtsCount, + .ppEnabledExtensionNames = enabledExts, + .pEnabledFeatures = &enabledFeatures, + }; + + vkhDev = vkh_device_create(app, pi, &device_info); + presentQIndex = (uint32_t)pi->pQueue; + renderer = + vkh_presenter_create(vkhDev, presentQIndex, vkSurf, width, height, VK_FORMAT_B8G8R8A8_SRGB, presentMode); + + + vkh_app_free_phyinfos(phyCount, phys); + + glfwSetKeyCallback(win, key_callback); + glfwSetMouseButtonCallback(win, mouse_button_callback); + glfwSetCursorPosCallback(win, mouse_move_callback); + +} + +void SampleApp::Run() { + uint32_t curIter = 0; + + if (VkvgTest::tests.empty()) + return; + + int testIdx = 0; + auto it = VkvgTest::tests.begin(); + VkvgTest* curTest = NULL; + + if (testsToRun.empty()) { + curTest = (*it); + } else { + curTest = VkvgTest::tests[testsToRun[testIdx]]; + } + + glfwSetWindowTitle(win, curTest->name.c_str()); + curTest->initTest(this); + + while (!glfwWindowShouldClose(win)) { + glfwPollEvents(); + + curTest->performTest(); + + if (!vkh_presenter_draw(renderer)) { + vkh_presenter_get_size(renderer, &width, &height); + curTest->cleanTest(); + curTest->initTest(this); + continue; + } + + if (iterations > 0) { + if (++curIter == iterations) { + testIdx++; + curTest->cleanTest(); + if (testsToRun.empty()) { + if (++it == VkvgTest::tests.end()){ + curTest = NULL; + break; + } + curTest = (*it); + } else { + if (testIdx == testsToRun.size()) { + curTest = NULL; + break; + } + curTest = VkvgTest::tests[testsToRun[testIdx]]; + } + + curIter = 0; + glfwSetWindowTitle(win, curTest->name.c_str()); + curTest->initTest(this); + } + } + } + if (curTest != NULL) + curTest->cleanTest(); +} + +void SampleApp::CleanUp() { + vkDeviceWaitIdle(vkh_device_get_vkdev(vkhDev)); + vkh_presenter_destroy(renderer); + vkDestroySurfaceKHR(vkh_app_get_inst(app), vkSurf, NULL); + + vkh_device_destroy(vkhDev); + glfwDestroyWindow(win); + vkh_app_destroy(app); + + glfwTerminate(); +} diff --git a/samples/SampleApp.hpp b/samples/SampleApp.hpp new file mode 100644 index 0000000..97f0620 --- /dev/null +++ b/samples/SampleApp.hpp @@ -0,0 +1,51 @@ +#pragma once +#include +#include + +#include "vkvg.h" +#include "vkh.h" + +#include + +#define TRY_LOAD_DEVICE_EXT(ext) \ +{ \ + if (vkh_phyinfo_try_get_extension_properties(pi, #ext, NULL)) \ + enabledExts[enabledExtsCount++] = #ext; \ +} + + +class SampleApp { + bool try_get_phyinfo(VkhPhyInfo *phys, uint32_t phyCount, VkPhysicalDeviceType gpuType, VkhPhyInfo *phy); + + static void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods); + + VkPhysicalDeviceMemoryProperties memory_properties; + VkPhysicalDeviceProperties gpu_props; + + public: + uint32_t width = 512; + uint32_t height = 512; + uint32_t iterations = 0; + uint32_t testSize = 500; + std::vector logSeverity = {1}; + uint32_t logType = 0; + bool listGpus = false; + int32_t gpuIndex = -1; + VkSampleCountFlags samples = VK_SAMPLE_COUNT_1_BIT; + + std::vector testsToRun; + VkPhysicalDeviceType preferedGPU = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU; + VkPresentModeKHR presentMode = VK_PRESENT_MODE_MAILBOX_KHR; + + GLFWwindow* win; + VkSurfaceKHR vkSurf; + VkhApp app; + VkhDevice vkhDev; + VkhPresenter renderer; + uint32_t presentQIndex; + + void Init(); + void Run(); + void CleanUp(); +}; + diff --git a/samples/VkvgTest.cpp b/samples/VkvgTest.cpp new file mode 100644 index 0000000..2617e45 --- /dev/null +++ b/samples/VkvgTest.cpp @@ -0,0 +1,171 @@ +#include "VkvgTest.hpp" + + +std::vector VkvgTest::tests; + +VkvgTest::VkvgTest(VkvgTestFunc testFunc, std::string _name) { + this->testFunc = testFunc; + this->name = _name; + VkvgTest::tests.push_back(this); +} +void VkvgTest::initTest(SampleApp* app) { + this->app = app; + + vkvg_device_create_info_t info = { + app->samples, false, + vkh_app_get_inst(app->app), vkh_device_get_phy(app->vkhDev), vkh_device_get_vkdev(app->vkhDev), app->presentQIndex, 0, false}; + + device = vkvg_device_create(&info); + surf = vkvg_surface_create(device, app->width, app->height); + vkvg_device_set_dpy(device, 96, 96); + + vkh_presenter_build_blit_cmd(app->renderer, vkvg_surface_get_vk_image(surf), app->width, app->height); + + vkDeviceWaitIdle(vkh_device_get_vkdev(app->vkhDev)); +} +void VkvgTest::performTest() { + testFunc(this); +} +void VkvgTest::cleanTest() { + vkDeviceWaitIdle(vkh_device_get_vkdev(app->vkhDev)); + vkvg_surface_destroy(surf); + vkvg_device_destroy(device); + vkDeviceWaitIdle(vkh_device_get_vkdev(app->vkhDev)); +} + +void draw_growing_circles(VkvgContext ctx, float y, int count) { + float x = 2; + for (int i = 1; i < count; i++) { + x += 0.5f * i; + vkvg_arc(ctx, x + 2, y, 0.5f * i, 0, M_PIF * 1.5f); + x += 0.5f * i + 5; + } +} +/* common context init for several tests */ +vkvg_fill_rule_t fill_rule = VKVG_FILL_RULE_NON_ZERO; +vkvg_line_cap_t line_cap = VKVG_LINE_CAP_BUTT; +vkvg_line_join_t line_join = VKVG_LINE_JOIN_MITER; +float dashes[] = {10.0f, 6.0f}; +// float dashes[] = {0.0f, 10.0f}; +uint32_t dashes_count = 0; +float dash_offset = 0; +float line_width = 2.f; + +/*VkvgContext _initCtx() { + VkvgContext ctx = vkvg_create(surf); + + vkvg_set_line_width(ctx, line_width); + vkvg_set_line_join(ctx, line_join); + vkvg_set_line_cap(ctx, line_cap); + vkvg_set_dash(ctx, dashes, dashes_count, dash_offset); + vkvg_set_fill_rule(ctx, fill_rule); + return ctx; +}*/ + +const int star_points[11][2] = {{0, 85}, {75, 75}, {100, 10}, {125, 75}, {200, 85}, {150, 125}, + {160, 190}, {100, 150}, {40, 190}, {50, 125}, {0, 85}}; +void randomize_color(VkvgContext ctx) { vkvg_set_source_rgba(ctx, rndf(), rndf(), rndf(), rndf()); } + +void VkvgTest::draw_random_shape(VkvgContext ctx, shape_t shape, float sizeFact) { + float w = (float)app->width; + float h = (float)app->height; + + + float x, y, z, v, r; + + randomize_color(ctx); + + switch (shape) { + case SHAPE_LINE: + x = rndf() * w; + y = rndf() * h; + z = rndf() * w; + v = rndf() * h; + + vkvg_move_to(ctx, x, y); + vkvg_line_to(ctx, z, v); + vkvg_stroke(ctx); + break; + case SHAPE_RECTANGLE: + z = truncf((sizeFact * w * rndf()) + 1.f); + v = truncf((sizeFact * h * rndf()) + 1.f); + x = truncf((w - z) * rndf()); + y = truncf((h - v) * rndf()); + + vkvg_rectangle(ctx, x + 1, y + 1, z, v); + break; + case SHAPE_ROUNDED_RECTANGLE: + z = truncf((sizeFact * w * rndf()) + 1.f); + v = truncf((sizeFact * h * rndf()) + 1.f); + x = truncf((w - z) * rndf()); + y = truncf((h - v) * rndf()); + r = truncf((0.2f * z * rndf()) + 1.f); + + if ((r > v / 2) || (r > z / 2)) + r = MIN(v / 2, z / 2); + + vkvg_move_to(ctx, x, y + r); + vkvg_arc(ctx, x + r, y + r, r, (float)M_PI, (float)-M_PI_2); + vkvg_line_to(ctx, x + z - r, y); + vkvg_arc(ctx, x + z - r, y + r, r, (float)-M_PI_2, 0); + vkvg_line_to(ctx, x + z, y + v - r); + vkvg_arc(ctx, x + z - r, y + v - r, r, 0, (float)M_PI_2); + vkvg_line_to(ctx, x + r, y + v); + vkvg_arc(ctx, x + r, y + v - r, r, (float)M_PI_2, (float)M_PI); + vkvg_line_to(ctx, x, y + r); + vkvg_close_path(ctx); + break; + case SHAPE_CIRCLE: + /*x = truncf((float)w * rnd()/RAND_MAX); + y = truncf((float)h * rnd()/RAND_MAX); + v = truncf((float)w * rnd()/RAND_MAX * 0.2f);*/ + x = rndf() * w; + y = rndf() * h; + + r = truncf((sizeFact * MIN(w, h) * rndf()) + 1.f); + + /*float r = 0.5f*w*rand()/RAND_MAX; + float x = truncf(0.5f * w*rand()/RAND_MAX + r); + float y = truncf(0.5f * w*rand()/RAND_MAX + r);*/ + + vkvg_arc(ctx, x, y, r, 0, (float)M_PI * 2.0f); + break; + case SHAPE_TRIANGLE: + case SHAPE_STAR: + x = rndf() * w; + y = rndf() * h; + z = rndf() * sizeFact + 0.15f; // scale + + vkvg_move_to(ctx, x + star_points[0][0] * z, y + star_points[0][1] * z); + for (int s = 1; s < 11; s++) + vkvg_line_to(ctx, x + star_points[s][0] * z, y + star_points[s][1] * z); + vkvg_close_path(ctx); + break; + case SHAPE_RANDOM: + draw_random_shape(ctx, (shape_t)(1 + (rndf() * 4)), sizeFact); + break; + } +} +void VkvgTest::draw_random_curve(VkvgContext ctx) { + float w = (float)app->width; + float h = (float)app->height; + + float x2 = w * rndf(); + float y2 = h * rndf(); + float cp_x1 = w * rndf(); + float cp_y1 = h * rndf(); + float cp_x2 = w * rndf(); + float cp_y2 = h * rndf(); + + vkvg_curve_to(ctx, cp_x1, cp_y1, cp_x2, cp_y2, x2, y2); +} +void VkvgTest::draw_random_square(VkvgContext ctx, float s) { + float w = (float)app->width; + float h = (float)app->height; + randomize_color(ctx); + + float x = truncf(w * rndf()); + float y = truncf(h * rndf()); + + vkvg_rectangle(ctx, x, y, s, s); +} diff --git a/samples/VkvgTest.hpp b/samples/VkvgTest.hpp new file mode 100644 index 0000000..2f73847 --- /dev/null +++ b/samples/VkvgTest.hpp @@ -0,0 +1,73 @@ +#pragma once + +#include "rnd.h" + +#include +#include +#include + +#include "SampleApp.hpp" + + +#define M_PIF 3.14159265359f /* float pi */ +#define M_PIF_MULT_2 6.28318530718f +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661923 /* pi/2 */ +#endif + +#ifndef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif + +#ifndef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif + +namespace fs = std::filesystem; +#define GET_PATH(fileName) (char*)(fs::path(SAMPLES_DATA_ROOT) / fileName).c_str() + +typedef enum _shape_t { + SHAPE_LINE, + SHAPE_RECTANGLE, + SHAPE_ROUNDED_RECTANGLE, + SHAPE_CIRCLE, + SHAPE_TRIANGLE, + SHAPE_STAR, + SHAPE_RANDOM, +} shape_t; + +class VkvgTest; +typedef void (*VkvgTestFunc) (VkvgTest* test); + + +class VkvgTest { + VkvgTestFunc testFunc; + public: + static std::vector tests; + + SampleApp* app; + std::string name; + VkvgTest(VkvgTestFunc testFunc, std::string _name); + + VkvgDevice device; + VkvgSurface surf; + + + void initTest(SampleApp* app); + void performTest(); + void cleanTest(); + + void draw_random_shape(VkvgContext ctx, shape_t shape, float sizeFact); + void draw_random_curve(VkvgContext ctx); + void draw_random_square(VkvgContext ctx, float s); +}; +#define TEST(name) \ + static void name(VkvgTest* test); \ + static VkvgTest _##name(name, #name); \ + static void name(VkvgTest* test) + +void draw_growing_circles(VkvgContext ctx, float y, int count); +void randomize_color(VkvgContext ctx); diff --git a/samples/main.cpp b/samples/main.cpp new file mode 100644 index 0000000..4a6a122 --- /dev/null +++ b/samples/main.cpp @@ -0,0 +1,86 @@ +#include "SampleApp.hpp" +#include "VkvgTest.hpp" + +#include "argparse/argparse.hpp" + +int main(int argc, char **argv) { + SampleApp app{}; + + argparse::ArgumentParser program("samples"); + program.add_argument("-w", "--width") + .help("Output width") + .default_value(512) + .store_into(app.width); + program.add_argument("-h", "--height") + .help("Output height") + .default_value(512) + .store_into(app.height); + program.add_argument("-i", "--iterations") + .help("iterations for each test, 0 is infinite loop") + .default_value(0) + .store_into(app.iterations); + program.add_argument("-s", "--size") + .help("test size when applicable") + .default_value(500) + .store_into(app.testSize); + +#if defined(DEBUG) && defined(VKVG_DBG_UTILS) + program.add_argument("--severity") + .help("Debug messenger severity: 3:Err 2:Warn 1:Info 0:Verbose") + .default_value>({0}) + .scan<'u', uint32_t>() + .nargs(argparse::nargs_pattern::at_least_one); + program.add_argument("--logtype") + .help("Log type bits: 1:General 2:Validation 4:Perf 8:DevAddrBind") + .default_value(2) + .store_into(app.logType); +#endif + + program.add_argument("-t", "--test-indices") + .default_value>({}) + .help("test indices to run") + .scan<'u', uint32_t>() + .nargs(argparse::nargs_pattern::at_least_one); + + program.add_argument("--list-tests") + .help("Get tests list") + .default_value(false) + .implicit_value(true); + + program.add_argument("--list-gpus") + .help("Get available GPU's, select with option '-g'") + .default_value(false) + .implicit_value(true) + .store_into(app.listGpus); + program.add_argument("-g", "--gpu") + .help("GPU index") + .default_value(-1) + .store_into(app.gpuIndex); + + try { + program.parse_args(argc, argv); + } + catch (const std::exception& err) { + std::cerr << err.what() << std::endl; + std::cerr << program; + std::exit(1); + } + + if (program["--list-tests"] == true) { + for (auto it = VkvgTest::tests.begin(); it != VkvgTest::tests.end(); ++it) { + int index = std::distance(VkvgTest::tests.begin(), it); + std::cout << std::setw(4) << index << " " << (*it)->name << std::endl; + } + exit(0); + } + + app.testsToRun = program.get>("--test-indices"); + +#if defined(DEBUG) && defined(VKVG_DBG_UTILS) + app.logSeverity = program.get>("--severity"); +#endif + + app.Init(); + app.Run(); + +} diff --git a/samples/rnd.cpp b/samples/rnd.cpp new file mode 100644 index 0000000..448bd0e --- /dev/null +++ b/samples/rnd.cpp @@ -0,0 +1,1259 @@ +static int _rnd_count = 9999; +static float _rnd[] = { + 0.39540747, 0.841546, 0.52073574, 0.80399257, 0.95868486, 0.46164507, 0.5644759, 0.50258803, + 0.1953517, 0.40522006, 0.7953865, 0.7795385, 0.6009604, 0.03921096, 0.56872225, 0.93369347, + 0.7019503, 0.5392296, 0.2671585, 0.87286836, 0.28110227, 0.41505373, 0.8609184, 0.65234584, + 0.18079561, 0.1345461, 0.26905555, 0.97823226, 0.9349287, 0.37662244, 0.47883937, 0.1831086, + 0.63446456, 0.2549137, 0.8205819, 0.44705132, 0.7044422, 0.36040744, 0.29616997, 0.60375917, + 0.21973382, 0.094351165, 0.3769042, 0.9975177, 0.6133292, 0.3379986, 0.88620085, 0.83456165, + 0.16677794, 0.2749627, 0.28938183, 0.6274365, 0.058304083, 0.97233975, 0.48520145, 0.9803537, + 0.9806276, 0.8683899, 0.62319696, 0.82413876, 0.19258952, 0.5862436, 0.5676593, 0.8187293, + 0.9263807, 0.6122779, 0.14507395, 0.34604672, 0.21862903, 0.121670924, 0.22925124, 0.34154287, + 0.2430596, 0.66339934, 0.6531345, 0.1867511, 0.038149532, 0.8634007, 0.039016694, 0.84279704, + 0.24834526, 0.4344939, 0.8114543, 0.65996605, 0.08724063, 0.8514029, 0.12480451, 0.6621248, + 0.76971227, 0.8402282, 0.46642372, 0.83605236, 0.73721045, 0.47203118, 0.41116965, 0.6334902, + 0.52669185, 0.55817497, 0.07113702, 0.0010512439, 0.19292463, 0.5401541, 0.61593264, 0.045107026, + 0.04571145, 0.94783896, 0.3843769, 0.39490476, 0.3192052, 0.29845035, 0.9422042, 0.11722695, + 0.8293732, 0.7804, 0.5757935, 0.7580956, 0.7747893, 0.90769327, 0.73148865, 0.074977815, + 0.4874734, 0.48294914, 0.5763345, 0.37840083, 0.6552472, 0.39319888, 0.6043324, 0.77102846, + 0.25222966, 0.019644327, 0.6600592, 0.4799746, 0.7922636, 0.03796545, 0.64987236, 0.70819116, + 0.81856126, 0.7663473, 0.6142546, 0.13940167, 0.46702597, 0.72989976, 0.34291962, 0.47126192, + 0.89802396, 0.34919676, 0.0066791615, 0.95681053, 0.8962376, 0.653074, 0.85870093, 0.6189986, + 0.8266863, 0.9961592, 0.5135778, 0.7099755, 0.9638197, 0.2375318, 0.3898598, 0.65251255, + 0.34350657, 0.6133485, 0.14267509, 0.29956087, 0.6383911, 0.4622296, 0.3249633, 0.79140776, + 0.13052759, 0.8676024, 0.93953437, 0.008441999, 0.2934387, 0.592087, 0.6079518, 0.75757366, + 0.14002953, 0.10507256, 0.48037684, 0.30605045, 0.38651973, 0.64752185, 0.8747908, 0.59915566, + 0.1609434, 0.04106063, 0.65328825, 0.79610443, 0.5243876, 0.9398969, 0.7443715, 0.5810295, + 0.3764875, 0.961742, 0.7958951, 0.8536775, 0.58722466, 0.043358732, 0.8328708, 0.43579438, + 0.024233455, 0.21527143, 0.8262829, 0.028635254, 0.71353966, 0.85025895, 0.3255599, 0.23459937, + 0.38820738, 0.7560042, 0.569946, 0.8587471, 0.75715494, 0.083809346, 0.26599285, 0.6959847, + 0.73855764, 0.54351944, 0.13861747, 0.59733045, 0.80894136, 0.52885884, 0.26702014, 0.1906307, + 0.123230904, 0.35850486, 0.6319545, 0.3316967, 0.7961919, 0.7542743, 0.17034897, 0.0966708, + 0.27220175, 0.04458247, 0.28181702, 0.1712483, 0.82123893, 0.8461555, 0.88561594, 0.3106845, + 0.7155007, 0.4186889, 0.40789708, 0.76838344, 0.36995092, 0.8856244, 0.82387453, 0.29267815, + 0.69574916, 0.099910386, 0.11511985, 0.04370523, 0.9047413, 0.23554033, 0.62685305, 0.4953746, + 0.9482513, 0.63565224, 0.9054043, 0.3550348, 0.21830441, 0.9938632, 0.4384075, 0.633933, + 0.5856552, 0.47327515, 0.58654535, 0.71257246, 0.80199236, 0.09474454, 0.8747458, 0.8924021, + 0.6579035, 0.82793295, 0.88182974, 0.39025244, 0.12096177, 0.4986367, 0.8206798, 0.23760653, + 0.53463036, 0.33927637, 0.6359475, 0.6962815, 0.6391545, 0.12664375, 0.19192953, 0.036661416, + 0.41772944, 0.7864424, 0.222997, 0.18558672, 0.9407512, 0.5305812, 0.092380084, 0.7216375, + 0.9802814, 0.77396405, 0.18272822, 0.89667577, 0.29907903, 0.11130205, 0.4906858, 0.60100466, + 0.22516462, 0.22271773, 0.38580173, 0.07680829, 0.3537106, 0.23660058, 0.37441283, 0.4496146, + 0.81497246, 0.6677978, 0.82040447, 0.879028, 0.35791573, 0.742126, 0.9947786, 0.45901147, + 0.28134564, 0.54988396, 0.29484302, 0.015549939, 0.87174755, 0.68915904, 0.9516509, 0.12732233, + 0.7355529, 0.16019227, 0.40997103, 0.34699774, 0.31590846, 0.924004, 0.93852746, 0.4233283, + 0.84859055, 0.034942873, 0.47111684, 0.41643673, 0.740842, 0.115121245, 0.68295085, 0.18112887, + 0.41202956, 0.77338237, 0.3706143, 0.27295336, 0.7101767, 0.21335205, 0.36372176, 0.2381554, + 0.7791855, 0.72371674, 0.6153301, 0.7491951, 0.816459, 0.47513586, 0.7292571, 0.5360056, + 0.2710668, 0.25847942, 0.3412554, 0.19351831, 0.8266295, 0.0274151, 0.13370614, 0.8909684, + 0.72927034, 0.39707616, 0.030437447, 0.32297286, 0.27100918, 0.57834184, 0.71816945, 0.16622439, + 0.8669331, 0.11371415, 0.6035204, 0.09836516, 0.31854475, 0.6786976, 0.41714564, 0.5222008, + 0.7964705, 0.17181565, 0.56781226, 0.5921917, 0.30867395, 0.1893324, 0.6068693, 0.37345472, + 0.3056858, 0.9351113, 0.14536993, 0.4823626, 0.7738658, 0.4894325, 0.35449934, 0.38461447, + 0.6396763, 0.4796459, 0.54368305, 0.31310055, 0.18291461, 0.040748898, 0.9671462, 0.20084366, + 0.0055472897, 0.4491057, 0.882262, 0.7027449, 0.87161547, 0.6308919, 0.21746083, 0.59236926, + 0.8413338, 0.81905454, 0.3970478, 0.6548139, 0.45960286, 0.5415144, 0.58229446, 0.539938, + 0.7902069, 0.6569827, 0.017287076, 0.33589792, 0.4329719, 0.23580688, 0.39235854, 0.3775006, + 0.7592148, 0.2189059, 0.45868888, 0.83889884, 0.13501453, 0.10404509, 0.3392862, 0.7557216, + 0.20466943, 0.36696857, 0.5866444, 0.85956824, 0.3070704, 0.9041244, 0.5018392, 0.67479384, + 0.7176504, 0.5530007, 0.6410288, 0.9548113, 0.092384726, 0.69968545, 0.92501163, 0.09816185, + 0.89735144, 0.0037450776, 0.52289367, 0.5259319, 0.023461822, 0.6312483, 0.7678718, 0.7697404, + 0.05674718, 0.5047614, 0.9435301, 0.6527096, 0.17220303, 0.37856197, 0.45735472, 0.7372887, + 0.47976837, 0.6413262, 0.45014447, 0.09263428, 0.95487, 0.7227262, 0.23286755, 0.8860825, + 0.15514348, 0.34249324, 0.61824745, 0.8799712, 0.59477806, 0.43754727, 0.28511587, 0.059529364, + 0.2938943, 0.36052704, 0.9415474, 0.13126945, 0.5811514, 0.8133543, 0.7322598, 0.5734211, + 0.5990968, 0.816904, 0.80282104, 0.802309, 0.96059436, 0.8491296, 0.50259084, 0.33908847, + 0.09564596, 0.9037401, 0.4750429, 0.45105854, 0.24954097, 0.8323773, 0.14329186, 0.17462522, + 0.77087754, 0.63681114, 0.3707884, 0.6809686, 0.013000839, 0.8879006, 0.17496233, 0.61919993, + 0.21964556, 0.8840007, 0.3588153, 0.81167597, 0.43701455, 0.32608527, 0.15613726, 0.666414, + 0.9090664, 0.87672335, 0.4935375, 0.13796596, 0.9199052, 0.43055856, 0.9254882, 0.30601385, + 0.8399024, 0.279159, 0.78432524, 0.69103795, 0.9625043, 0.83405733, 0.8099884, 0.46151695, + 0.2172352, 0.7669222, 0.3603919, 0.9443403, 0.44256592, 0.0512912, 0.5604203, 0.7111962, + 0.64194167, 0.18362112, 0.5826634, 0.07659364, 0.49031433, 0.6909148, 0.9020739, 0.7695607, + 0.7476028, 0.80862886, 0.5419922, 0.3728176, 0.33883983, 0.005325912, 0.25472003, 0.34031895, + 0.711323, 0.064774565, 0.8410662, 0.73384184, 0.10357534, 0.48392436, 0.65669554, 0.38558826, + 0.07401231, 0.8972984, 0.5944408, 0.67009234, 0.96569335, 0.21179698, 0.22384812, 0.8577752, + 0.31630307, 0.7823413, 0.49602425, 0.7362841, 0.84789515, 0.84889454, 0.8156995, 0.14898759, + 0.3770851, 0.01476456, 0.94343513, 0.15387547, 0.29206514, 0.43717077, 0.12267711, 0.21190928, + 0.5122022, 0.020072967, 0.23301727, 0.37779135, 0.21022503, 0.82657844, 0.60762084, 0.15801735, + 0.52692556, 0.19707517, 0.0025813282, 0.59301597, 0.09647403, 0.23198159, 0.80386734, 0.5358059, + 0.58478075, 0.684217, 0.056514528, 0.5564985, 0.50930166, 0.51843596, 0.4924238, 0.8624285, + 0.24907504, 0.6920786, 0.35675675, 0.08881078, 0.5404892, 0.5028201, 0.0935231, 0.63684154, + 0.77462125, 0.38253152, 0.15789017, 0.94562036, 0.97877973, 0.84605676, 0.64755017, 0.48972467, + 0.17472044, 0.3380069, 0.2093585, 0.65081996, 0.8463132, 0.22268358, 0.052513562, 0.1451035, + 0.21089722, 0.40762928, 0.5690947, 0.60784817, 0.38065624, 0.56617856, 0.70260763, 0.99376625, + 0.52764916, 0.37058878, 0.1287163, 0.51814646, 0.4698217, 0.5188101, 0.61752814, 0.024105478, + 0.103552066, 0.3657398, 0.81839466, 0.7139425, 0.07409142, 0.858247, 0.55702615, 0.738724, + 0.03666682, 0.56678987, 0.38177812, 0.17129473, 0.30907747, 0.8416038, 0.016115308, 0.02639147, + 0.639565, 0.21165326, 0.87791353, 0.13285992, 0.9337254, 0.48567492, 0.2561853, 0.20844269, + 0.6799239, 0.16412394, 0.41797122, 0.60819095, 0.71734047, 0.12940371, 0.019902974, 0.6559104, + 0.7204788, 0.18525302, 0.5472679, 0.4805734, 0.4042889, 0.33857107, 0.07101207, 0.35265025, + 0.85060316, 0.8303707, 0.57118136, 0.8138664, 0.18440045, 0.5313129, 0.68468875, 0.68604535, + 0.35447347, 0.10232483, 0.8785814, 0.25816843, 0.6408965, 0.48466823, 0.09038009, 0.6178771, + 0.10955451, 0.609952, 0.034018606, 0.9099675, 0.44027576, 0.9488352, 0.021383535, 0.9072631, + 0.5468869, 0.72586775, 0.45081598, 0.12382444, 0.29433593, 0.5355419, 0.62210256, 0.30099395, + 0.14064118, 0.5252633, 0.28225678, 0.10335469, 0.91449356, 0.44231892, 0.024042243, 0.14861101, + 0.47943518, 0.7319259, 0.2537175, 0.6150156, 0.25082228, 0.76173455, 0.01501382, 0.23581055, + 0.09487294, 0.9293908, 0.3710189, 0.7943369, 0.30455244, 0.1610446, 0.9123745, 0.90176797, + 0.80898714, 0.66391826, 0.2669795, 0.4585327, 0.08049692, 0.5608643, 0.3917094, 0.8189315, + 0.48022225, 0.5775875, 0.11752723, 0.11563321, 0.20241146, 0.9870254, 0.70338356, 0.6672356, + 0.5859097, 0.88540757, 0.4305323, 0.7083498, 0.69511765, 0.4063679, 0.6564408, 0.7851523, + 0.71085393, 0.21500541, 0.028951503, 0.36494514, 0.16452302, 0.8277657, 0.9964415, 0.9795966, + 0.6128888, 0.38048878, 0.29436752, 0.25057533, 0.17533945, 0.56550956, 0.06811409, 0.9185709, + 0.3402165, 0.43478596, 0.13479339, 0.6732348, 0.64420736, 0.8993806, 0.033399098, 0.10784754, + 0.22600721, 0.7037833, 0.20842715, 0.41914487, 0.7305123, 0.20402466, 0.2066503, 0.40261927, + 0.007477421, 0.48182714, 0.74767876, 0.8654915, 0.5319128, 0.026764244, 0.6544085, 0.6524566, + 0.58114594, 0.13793063, 0.50274444, 0.82192266, 0.6926579, 0.45280823, 0.49189615, 0.020400187, + 0.8172935, 0.51196146, 0.36813334, 0.26033172, 0.27157453, 0.983206, 0.140945, 0.81147337, + 0.18160632, 0.92110395, 0.13893794, 0.46073973, 0.6193385, 0.5772967, 0.2490843, 0.40886414, + 0.1738385, 0.89174825, 0.24309792, 0.6935123, 0.8178308, 0.20262258, 0.38665804, 0.31345224, + 0.78037745, 0.48233682, 0.09208888, 0.50627667, 0.3966362, 0.21147643, 0.41518968, 0.77319896, + 0.21188715, 0.18802696, 0.60185134, 0.21855086, 0.8358913, 0.94631857, 0.13104475, 0.024271427, + 0.34088212, 0.9362054, 0.6838852, 0.61080885, 0.8878263, 0.1936688, 0.03311803, 0.0038492912, + 0.88884634, 0.09388026, 0.64808416, 0.8009096, 0.2097103, 0.79838383, 0.20256937, 0.61467093, + 0.1253034, 0.054681093, 0.47995427, 0.7892377, 0.8911171, 0.6346683, 0.41483715, 0.9701299, + 0.5059143, 0.36573896, 0.24885257, 0.43131158, 0.97544533, 0.03053343, 0.57297283, 0.2275199, + 0.7607035, 0.21882649, 0.3526302, 0.8816254, 0.5187374, 0.77584916, 0.42562595, 0.58670866, + 0.44921878, 0.08823959, 0.6174303, 0.30275592, 0.5633923, 0.61428005, 0.56348866, 0.41350332, + 0.9854576, 0.9871804, 0.093247466, 0.7812102, 0.4663643, 0.34180707, 0.13315432, 0.70621383, + 0.52136827, 0.7137553, 0.10489457, 0.52208734, 0.94481623, 0.60180646, 0.028403986, 0.8583129, + 0.5209074, 0.42056426, 0.04020609, 0.9908838, 0.44575363, 0.32094392, 0.09593353, 0.34945422, + 0.62905514, 0.89324564, 0.3400189, 0.80287755, 0.017237967, 0.112081215, 0.40673763, 0.8916342, + 0.80225027, 0.83534926, 0.44585398, 0.98826486, 0.93728596, 0.79176265, 0.7611556, 0.41889647, + 0.08567218, 0.64641637, 0.3602572, 0.80498207, 0.6709546, 0.9035386, 0.64189243, 0.84741235, + 0.0598356, 0.7591174, 0.7818485, 0.142828, 0.574074, 0.5726049, 0.96774966, 0.6645137, + 0.8912469, 0.74379325, 0.15215507, 0.5731187, 0.0017881524, 0.3302768, 0.6889758, 0.40928704, + 0.30701768, 0.21326037, 0.71983707, 0.10946698, 0.1559525, 0.040139113, 0.92102695, 0.7291448, + 0.6594087, 0.62130964, 0.9052116, 0.79933727, 0.9606867, 0.29095143, 0.6784996, 0.72551656, + 0.2513532, 0.49260658, 0.74304193, 0.25812054, 0.33023268, 0.2639096, 0.31756023, 0.22964539, + 0.86759955, 0.7813403, 0.097017966, 0.19349271, 0.63960755, 0.18803692, 0.4171083, 0.7553954, + 0.95744056, 0.9509702, 0.4979644, 0.45769426, 0.18370152, 0.53242546, 0.69145983, 0.019696489, + 0.8380905, 0.052703734, 0.48341933, 0.95276433, 0.6673932, 0.16841243, 0.70382696, 0.6002955, + 0.06529366, 0.42663854, 0.32176548, 0.50918156, 0.58723485, 0.4308553, 0.079054326, 0.04310807, + 0.89570016, 0.4901917, 0.24186741, 0.3746122, 0.94312114, 0.72753423, 0.08953723, 0.47137174, + 0.20420133, 0.14981624, 0.8418967, 0.009716521, 0.79298705, 0.22080535, 0.541815, 0.71892774, + 0.80114675, 0.72334546, 0.42003006, 0.27752897, 0.7804903, 0.36479586, 0.56225216, 0.69918716, + 0.07751329, 0.4967225, 0.12819904, 0.212969, 0.86627144, 0.90792674, 0.16816054, 0.5265852, + 0.8719159, 0.45485634, 0.56199414, 0.6935098, 0.29055804, 0.31684762, 0.07657534, 0.11055623, + 0.9631665, 0.012047576, 0.74856305, 0.517577, 0.32651573, 0.69411045, 0.80730844, 0.8444883, + 0.88482356, 0.60283774, 0.7080349, 0.8638894, 0.010825248, 0.80152535, 0.26261777, 0.53090423, + 0.92793953, 0.54268026, 0.29709893, 0.44639865, 0.5993352, 0.8765682, 0.6051003, 0.2962746, + 0.9816557, 0.31531146, 0.13780066, 0.3381307, 0.6588112, 0.84830517, 0.4283697, 0.48429912, + 0.6467701, 0.30947384, 0.31436247, 0.7684427, 0.6162329, 0.044675153, 0.3726714, 0.38340282, + 0.689414, 0.28371072, 0.32814547, 0.26343372, 0.19989188, 0.30427113, 0.51576, 0.07039049, + 0.19223855, 0.031089857, 0.7655703, 0.7478778, 0.019748688, 0.63017666, 0.511221, 0.08659828, + 0.40694728, 0.45228842, 0.53592134, 0.011204251, 0.5563098, 0.46917772, 0.18567711, 0.036518365, + 0.17446801, 0.22373573, 0.21711932, 0.7013514, 0.48716292, 0.49417505, 0.9146714, 0.88326436, + 0.17000887, 0.9136961, 0.7569846, 0.3156245, 0.54842275, 0.34166658, 0.09638273, 0.67738456, + 0.7995515, 0.06741016, 0.14589214, 0.62772137, 0.08273488, 0.680492, 0.46455044, 0.016593413, + 0.7982528, 0.22776419, 0.36149544, 0.16394442, 0.50875384, 0.36146715, 0.827093, 0.22023632, + 0.098033614, 0.2916271, 0.088965714, 0.9761561, 0.08715181, 0.8144086, 0.5832276, 0.6980635, + 0.11641844, 0.8823059, 0.5778689, 0.106052585, 0.8731921, 0.19559653, 0.5381755, 0.06528069, + 0.3559057, 0.8585367, 0.21165277, 0.48889965, 0.32328558, 0.55795574, 0.95378345, 0.49397606, + 0.7591853, 0.20052591, 0.9030986, 0.25939873, 0.13267961, 0.750727, 0.37451053, 0.8085417, + 0.086603075, 0.5367483, 0.21759088, 0.25679567, 0.25270087, 0.120226584, 0.59023273, 0.9851429, + 0.48418257, 0.44782865, 0.51130295, 0.20042898, 0.102623075, 0.35849786, 0.14340132, 0.6026563, + 0.68958867, 0.29621476, 0.8080387, 0.6502171, 0.14981438, 0.3381934, 0.8969507, 0.54007787, + 0.33784363, 0.59498966, 0.21697083, 0.8866259, 0.91130996, 0.32382888, 0.5653839, 0.36569145, + 0.5077954, 0.76932716, 0.01944951, 0.3364438, 0.97800565, 0.28137985, 0.8125798, 0.2356791, + 0.268304, 0.22650987, 0.00471706, 0.8754569, 0.04665282, 0.7533545, 0.39135298, 0.40068746, + 0.05712457, 0.3004423, 0.56981003, 0.8364648, 0.9426883, 0.7242934, 0.65872735, 0.7484097, + 0.63979757, 0.677513, 0.91895205, 0.6577112, 0.90325576, 0.70360684, 0.07383294, 0.1603537, + 0.88244474, 0.14561148, 0.6926336, 0.3332959, 0.33904833, 0.80695754, 0.62465066, 0.40820882, + 0.48363495, 0.5723596, 0.38191313, 0.9233045, 0.33347633, 0.021493766, 0.49342504, 0.5844891, + 0.20363668, 0.81628335, 0.82950133, 0.6108677, 0.75401884, 0.728919, 0.42300317, 0.7835019, + 0.11059984, 0.2710398, 0.6966462, 0.30049264, 0.3624278, 0.1548686, 0.33242336, 0.56469715, + 0.15267694, 0.84436333, 0.9930122, 0.9010413, 0.06072089, 0.058057077, 0.061639126, 0.25016704, + 0.6757917, 0.16160122, 0.3528299, 0.37032866, 0.34238032, 0.7354228, 0.41493335, 0.6183038, + 0.18408795, 0.3344629, 0.45407453, 0.08697238, 0.8741055, 0.46296528, 0.40633488, 0.1535257, + 0.7226083, 0.90913165, 0.22269607, 0.068008505, 0.1103113, 0.32415798, 0.045781024, 0.32876635, + 0.23993625, 0.817216, 0.77062756, 0.48911297, 0.028481547, 0.5923837, 0.52376825, 0.14557959, + 0.7546443, 0.5793343, 0.935076, 0.5924176, 0.37608913, 0.05267449, 0.44112164, 0.37517703, + 0.85610646, 0.078342445, 0.11640469, 0.02796489, 0.70079404, 0.24545097, 0.69059163, 0.68971163, + 0.43802848, 0.83948654, 0.17843302, 0.15158923, 0.835361, 0.99363065, 0.13985574, 0.3516337, + 0.115820184, 0.02406358, 0.13039242, 0.5251643, 0.96479523, 0.92582035, 0.58982223, 0.59170425, + 0.8106947, 0.30849496, 0.33232814, 0.2947712, 0.5278893, 0.8139172, 0.77743655, 0.6699338, + 0.46801004, 0.84751904, 0.21190204, 0.031968854, 0.2077533, 0.017816134, 0.62797225, 0.99448526, + 0.12662433, 0.080915935, 0.05108449, 0.18899502, 0.41395068, 0.372179, 0.3102186, 0.7610136, + 0.43947858, 0.5834423, 0.47659743, 0.35202554, 0.9222821, 0.9159573, 0.4103818, 0.9302861, + 0.4885202, 0.52470046, 0.21727021, 0.39229912, 0.91312283, 0.39582044, 0.16182233, 0.62411124, + 0.062049974, 0.5084992, 0.6835792, 0.98784196, 0.78172857, 0.10788689, 0.1438804, 0.09800406, + 0.3960913, 0.13590716, 0.39854, 0.8838793, 0.8747359, 0.40082723, 0.17775355, 0.43851566, + 0.99827635, 0.5713145, 0.8552926, 0.94444704, 0.33731982, 0.42541102, 0.74765176, 0.55205274, + 0.43713725, 0.28161594, 0.5434486, 0.68305284, 0.80054593, 0.23567316, 0.08136242, 0.7308039, + 0.9190936, 0.42697325, 0.12694505, 0.9054515, 0.6885998, 0.32237664, 0.97928506, 0.33159167, + 0.43956187, 0.3785934, 0.9559342, 0.7863749, 0.5174173, 0.5265025, 0.05555021, 0.08769297, + 0.3469469, 0.77875453, 0.39402276, 0.34180835, 0.5405278, 0.21737531, 0.2867914, 0.636639, + 0.76084745, 0.13152646, 0.5507047, 0.50011265, 0.5644382, 0.46082756, 0.29745814, 0.16041815, + 0.054544732, 0.6677361, 0.9647857, 0.44776264, 0.27388218, 0.27230206, 0.74991584, 0.67589974, + 0.59202945, 0.52370095, 0.50488514, 0.9587264, 0.46947676, 0.9612768, 0.034635436, 0.91063476, + 0.22606573, 0.45575568, 0.33610594, 0.02179139, 0.8416504, 0.7395541, 0.19027609, 0.7017183, + 0.14018182, 0.49030608, 0.14460404, 0.55707335, 0.7716719, 0.47917238, 0.76715344, 0.9787343, + 0.08113525, 0.7955161, 0.7318302, 0.8496812, 0.5617168, 0.60778755, 0.81381077, 0.07464484, + 0.028838681, 0.718123, 0.74977887, 0.016826851, 0.71249014, 0.32806498, 0.16716221, 0.7995706, + 0.096891016, 0.64007, 0.27404693, 0.10868255, 0.12472161, 0.27566674, 0.31876773, 0.31499064, + 0.47746003, 0.2630674, 0.30758083, 0.78357613, 0.12769802, 0.1928425, 0.90422785, 0.112857096, + 0.7565475, 0.5261508, 0.8775912, 0.6739607, 0.22944665, 0.18495426, 0.3489179, 0.61827815, + 0.6419449, 0.2614611, 0.9929527, 0.12352738, 0.98977524, 0.17344923, 0.9892281, 0.81211686, + 0.32314387, 0.34503344, 0.46018234, 0.13160191, 0.20512545, 0.65847087, 0.8540127, 0.8054685, + 0.47674835, 0.41683954, 0.37222117, 0.29864943, 0.30020675, 0.03023468, 0.94694686, 0.8359962, + 0.8138952, 0.63692176, 0.26027933, 0.18633933, 0.45047382, 0.49320155, 0.570124, 0.91193676, + 0.2911521, 0.65576875, 0.46673766, 0.8632605, 0.28271404, 0.19524036, 0.32521543, 0.30401078, + 0.27383924, 0.495464, 0.46043226, 0.7826646, 0.7326602, 0.7726259, 0.90773165, 0.09807661, + 0.6721381, 0.07212267, 0.1972123, 0.8126071, 0.8127331, 0.05026847, 0.3180714, 0.6117102, + 0.31451428, 0.15695652, 0.30963218, 0.35285345, 0.9131699, 0.8028888, 0.36164302, 0.8299423, + 0.7749095, 0.54824555, 0.8404498, 0.5493567, 0.19173324, 0.9907522, 0.5227545, 0.281508, + 0.091624096, 0.06821037, 0.024810186, 0.80474275, 0.5698024, 0.16428226, 0.10333604, 0.04126928, + 0.7291901, 0.16220273, 0.5142012, 0.37835112, 0.29598927, 0.75751686, 0.09920368, 0.24088362, + 0.33769736, 0.85502744, 0.5487462, 0.12575752, 0.8856082, 0.972362, 0.3908409, 0.47095042, + 0.13382097, 0.63048995, 0.007755094, 0.18441458, 0.9321761, 0.35837498, 0.9063434, 0.6813859, + 0.5493682, 0.9157043, 0.720983, 0.7445227, 0.025458287, 0.5133287, 0.041907787, 0.15023202, + 0.053620476, 0.2683629, 0.6236633, 0.75096714, 0.28868756, 0.98329186, 0.5339531, 0.017392641, + 0.4490419, 0.5995662, 0.21165931, 0.3367058, 0.44200596, 0.39699697, 0.39589983, 0.11926211, + 0.6773695, 0.5538598, 0.6709218, 0.93931246, 0.15652716, 0.9189215, 0.10909318, 0.37081516, + 0.25585935, 0.83281535, 0.82898295, 0.38028497, 0.03653382, 0.35468096, 0.21542533, 0.8243687, + 0.81311965, 0.39851424, 0.07213704, 0.61724526, 0.34869868, 0.63987374, 0.18226288, 0.15052907, + 0.096536905, 0.99036247, 0.73537266, 0.3326099, 0.14671567, 0.5696376, 0.2393799, 0.15237123, + 0.5198045, 0.6017209, 0.067153245, 0.47159854, 0.84240687, 0.1025953, 0.99370486, 0.134699, + 0.15926972, 0.25284818, 0.4951078, 0.45587218, 0.15430894, 0.15366808, 0.9808588, 0.094360925, + 0.38414088, 0.3872906, 0.52358615, 0.043491747, 0.32485992, 0.7786546, 0.7705634, 0.037495736, + 0.37159687, 0.5203927, 0.8427756, 0.16616471, 0.18354878, 0.7764833, 0.22409947, 0.6862218, + 0.59343547, 0.6766117, 0.8604805, 0.4348129, 0.2875277, 0.7438268, 0.9819619, 0.7105244, + 0.4048094, 0.937438, 0.45797554, 0.09585048, 0.14476593, 0.7263907, 0.9962201, 0.9428688, + 0.009503636, 0.6410118, 0.94846904, 0.7594251, 0.04605143, 0.19588815, 0.8275113, 0.7411499, + 0.83115745, 0.02965751, 0.10000168, 0.32201412, 0.25981972, 0.82754016, 0.95115024, 0.38278645, + 0.02874871, 0.808886, 0.8624367, 0.47769725, 0.29318756, 0.5460459, 0.8068332, 0.6403141, + 0.4053287, 0.8130618, 0.63868237, 0.3874219, 0.320679, 0.67471296, 0.8927298, 0.64520615, + 0.5241726, 0.89990675, 0.15666108, 0.54253703, 0.82801425, 0.46467438, 0.64017034, 0.39754733, + 0.8491004, 0.11933059, 0.60365546, 0.25787023, 0.6438251, 0.65994775, 0.45070463, 0.57726926, + 0.98628783, 0.075189106, 0.06710178, 0.33587992, 0.863954, 0.51852286, 0.64968127, 0.46345773, + 0.83417857, 0.30815494, 0.35409638, 0.23298964, 0.5572058, 0.4400894, 0.4204709, 0.1564445, + 0.13692771, 0.4547955, 0.7978415, 0.35991296, 0.67087907, 0.4086132, 0.5547722, 0.56407434, + 0.16871567, 0.46488938, 0.62859684, 0.17385697, 0.94239044, 0.548963, 0.996489, 0.74538094, + 0.36235714, 0.061413143, 0.40113407, 0.24548991, 0.6076112, 0.5568499, 0.78125215, 0.005649717, + 0.2502255, 0.69320333, 0.70835847, 0.5198593, 0.110578, 0.4071807, 0.84034157, 0.40901098, + 0.6988597, 0.44721094, 0.12094251, 0.1890296, 0.86210626, 0.09079167, 0.90639013, 0.5776746, + 0.5204169, 0.50302744, 0.16716424, 0.39906463, 0.8899261, 0.47582427, 0.52106726, 0.2852156, + 0.31166598, 0.6087155, 0.87063247, 0.49579263, 0.03895533, 0.174981, 0.5488333, 0.5800778, + 0.67354333, 0.7921918, 0.10968746, 0.97767574, 0.70025474, 0.034912895, 0.45349634, 0.761535, + 0.6245478, 0.21958585, 0.47499728, 0.4951795, 0.42802048, 0.80745935, 0.8832747, 0.27156547, + 0.15502298, 0.8234595, 0.725073, 0.10458374, 0.38968566, 0.38218752, 0.11572367, 0.77440125, + 0.17213607, 0.42314288, 0.2081933, 0.5018625, 0.5365482, 0.3445489, 0.37005565, 0.5238787, + 0.8983776, 0.5408647, 0.51548624, 0.06991447, 0.9811042, 0.9287144, 0.8774199, 0.48550403, + 0.04953112, 0.40562928, 0.7745168, 0.6703402, 0.00082698837, 0.025887761, 0.8571951, 0.5042066, + 0.7254408, 0.59906703, 0.34076965, 0.21549584, 0.449908, 0.44424957, 0.19039217, 0.29135585, + 0.67646813, 0.33528623, 0.80553967, 0.27711186, 0.8267196, 0.95163375, 0.22498675, 0.2799989, + 0.8495302, 0.9511186, 0.5968019, 0.8871558, 0.2919731, 0.8133602, 0.29046127, 0.22630857, + 0.9460396, 0.23956898, 0.05505262, 0.98405635, 0.60767066, 0.4453835, 0.77357423, 0.14624831, + 0.5659478, 0.7039867, 0.7764218, 0.9374812, 0.0037792725, 0.1545598, 0.073970705, 0.45412806, + 0.35047254, 0.2241304, 0.39344636, 0.645818, 0.12317476, 0.600308, 0.65878445, 0.09789734, + 0.18064253, 0.49451795, 0.82080996, 0.049708407, 0.42908588, 0.9700393, 0.2122335, 0.9120806, + 0.30860576, 0.11446109, 0.26945624, 0.21033902, 0.38919696, 0.20633578, 0.6836851, 0.23108464, + 0.56171197, 0.6592914, 0.7111641, 0.122732915, 0.175212, 0.28750554, 0.2762196, 0.69497037, + 0.87714785, 0.14267384, 0.53668326, 0.06784272, 0.41991386, 0.6446433, 0.10313381, 0.34573162, + 0.58078456, 0.9571553, 0.8034138, 0.11315275, 0.62457347, 0.7238658, 0.71716243, 0.59590846, + 0.4917532, 0.8643412, 0.62887543, 0.88931817, 0.8851036, 0.86363167, 0.064931095, 0.14413676, + 0.54044527, 0.16236171, 0.084106006, 0.4638834, 0.8891439, 0.5360515, 0.9226853, 0.893137, + 0.21829833, 0.12583959, 0.17256053, 0.28641203, 0.4333561, 0.14439079, 0.49216673, 0.6639625, + 0.011327274, 0.9237246, 0.62955445, 0.43204167, 0.40292194, 0.5705324, 0.6065112, 0.83784616, + 0.94212896, 0.115255654, 0.6309797, 0.3108708, 0.6586301, 0.38690144, 0.8098668, 0.013516203, + 0.07774274, 0.39254647, 0.52739745, 0.25755215, 0.5605373, 0.6392504, 0.4565877, 0.044733036, + 0.034469932, 0.91027683, 0.8948544, 0.4987339, 0.5513053, 0.4307504, 0.16255233, 0.3473624, + 0.3721745, 0.96491295, 0.8779909, 0.961379, 0.2340772, 0.6328894, 0.7412148, 0.9699129, + 0.55585057, 0.24625985, 0.52175444, 0.77388823, 0.9050718, 0.61181456, 0.23450689, 0.8313969, + 0.31597278, 0.15904433, 0.20866929, 0.04080962, 0.6169933, 0.23461457, 0.1034252, 0.37207687, + 0.4671369, 0.58482146, 0.39757174, 0.4926451, 0.67567796, 0.107777245, 0.28654084, 0.5113785, + 0.9527033, 0.28361735, 0.9386963, 0.6937171, 0.50891054, 0.84848785, 0.779439, 0.44485334, + 0.65133166, 0.55748457, 0.7017016, 0.3142774, 0.11749596, 0.68269944, 0.13966125, 0.42265537, + 0.6757699, 0.06345752, 0.18276113, 0.39226097, 0.2220811, 0.12174272, 0.7303691, 0.13755992, + 0.8614878, 0.50591403, 0.4942421, 0.64925575, 0.23531766, 0.24856968, 0.29423487, 0.44807333, + 0.959719, 0.010375906, 0.82118493, 0.6214544, 0.67311823, 0.5407898, 0.3224864, 0.46748495, + 0.37960532, 0.76381594, 0.38947794, 0.05950873, 0.53291297, 0.7891478, 0.2545809, 0.7844374, + 0.44516018, 0.97491634, 0.81687516, 0.61222047, 0.9250161, 0.89427984, 0.28929746, 0.83096063, + 0.5532483, 0.8011364, 0.8322293, 0.0029964554, 0.35424575, 0.13018323, 0.20953566, 0.402762, + 0.2632497, 0.25362825, 0.3545584, 0.10712006, 0.8615145, 0.51820683, 0.7495371, 0.13498017, + 0.74097115, 0.7152762, 0.0126556605, 0.45826513, 0.73226476, 0.67086035, 0.6046469, 0.07234, + 0.25133318, 0.70980465, 0.20409557, 0.2604013, 0.43169454, 0.6820144, 0.5230572, 0.065439165, + 0.72107846, 0.99022436, 0.06820616, 0.87198186, 0.70856047, 0.31948993, 0.11323921, 0.24942209, + 0.5542803, 0.9867159, 0.79625905, 0.27928472, 0.4345894, 0.14746083, 0.9229229, 0.9269534, + 0.22537923, 0.681895, 0.8712493, 0.20973994, 0.8816242, 0.83103234, 0.098695815, 0.88238794, + 0.19648944, 0.75988936, 0.75166327, 0.64444107, 0.9260877, 0.94913435, 0.9710675, 0.5812353, + 0.7305711, 0.28911924, 0.3860416, 0.87129015, 0.45000067, 0.87755525, 0.42641973, 0.4214812, + 0.60203695, 0.7632336, 0.90398484, 0.74554884, 0.8746013, 0.32536224, 0.6377506, 0.10387234, + 0.7868817, 0.2771422, 0.035022065, 0.74979955, 0.8107651, 0.31331727, 0.18381497, 0.8900461, + 0.89152855, 0.18581823, 0.6754924, 0.9486711, 0.5678266, 0.4687981, 0.32333443, 0.60514593, + 0.015648454, 0.21502374, 0.5487136, 0.14547014, 0.76141924, 0.05163277, 0.4769527, 0.34782398, + 0.25547525, 0.44976813, 0.607703, 0.11839061, 0.9270475, 0.35314697, 0.007786621, 0.8711272, + 0.12213872, 0.64779097, 0.8575594, 0.64894545, 0.9141123, 0.22126794, 0.77047014, 0.4172538, + 0.10530428, 0.4959955, 0.97976166, 0.26418245, 0.20206283, 0.47774863, 0.85365456, 0.13323887, + 0.43989918, 0.29883888, 0.7299004, 0.65957755, 0.7766486, 0.49228048, 0.34245312, 0.7352489, + 0.8001895, 0.6871981, 0.49432427, 0.360997, 0.70561427, 0.06542435, 0.96299857, 0.5383816, + 0.1780316, 0.8043652, 0.82653236, 0.92003566, 0.6112387, 0.67438895, 0.6910336, 0.79438055, + 0.44455358, 0.13145985, 0.04016586, 0.26542372, 0.07187113, 0.21277027, 0.14576113, 0.77772665, + 0.59611356, 0.47446412, 0.6784915, 0.62820864, 0.62324655, 0.34820905, 0.094478644, 0.62985826, + 0.30533785, 0.122310445, 0.84875596, 0.22691421, 0.7269437, 0.40947318, 0.7116395, 0.039879926, + 0.5329969, 0.44138008, 0.08615084, 0.39769763, 0.65121627, 0.93361884, 0.52200013, 0.7655102, + 0.60780525, 0.9355199, 0.21502401, 0.64518875, 0.45211464, 0.0770294, 0.6633778, 0.5874192, + 0.541437, 0.7165977, 0.7648834, 0.2311502, 0.3869329, 0.33478996, 0.915135, 0.82982254, + 0.70988655, 0.19667415, 0.6146979, 0.4889283, 0.825633, 0.46411943, 0.067436874, 0.035080392, + 0.41982034, 0.0002859342, 0.7324268, 0.630491, 0.12661943, 0.7480635, 0.12651038, 0.6624947, + 0.952464, 0.9129812, 0.020403363, 0.6877267, 0.13318504, 0.44928992, 0.1777436, 0.22830844, + 0.45893264, 0.2613367, 0.68547726, 0.010346001, 0.6445898, 0.4804893, 0.652947, 0.19820693, + 0.52624506, 0.25632828, 0.687811, 0.4545421, 0.31892103, 0.033071853, 0.9398772, 0.14368583, + 0.868083, 0.17994362, 0.2253684, 0.4518287, 0.34460258, 0.032886766, 0.4607998, 0.7933734, + 0.59008723, 0.10238874, 0.27868623, 0.47395167, 0.3143866, 0.22740832, 0.6966375, 0.26059666, + 0.018930554, 0.3863894, 0.029995646, 0.5642963, 0.7786422, 0.05709087, 0.39049065, 0.939331, + 0.3473389, 0.53421986, 0.10424597, 0.8702912, 0.060252476, 0.6719683, 0.34357366, 0.9193921, + 0.97310406, 0.8767175, 0.8196437, 0.9532414, 0.22392152, 0.7259149, 0.88370585, 0.42604586, + 0.80053693, 0.8921038, 0.42025873, 0.54220104, 0.2018031, 0.17899537, 0.8838203, 0.29883677, + 0.5596908, 0.42721438, 0.43561155, 0.9325316, 0.0030762074, 0.37558094, 0.36504367, 0.8109921, + 0.78945297, 0.2860374, 0.10448979, 0.8103827, 0.9286408, 0.59050864, 0.733121, 0.91811895, + 0.75881505, 0.35929412, 0.50084764, 0.4376691, 0.40776464, 0.7433961, 0.036675144, 0.29301566, + 0.5026836, 0.6039498, 0.7637594, 0.8865383, 0.6368321, 0.8482896, 0.7375279, 0.16834354, + 0.65039957, 0.8054092, 0.31060037, 0.6330381, 0.23635677, 0.41104206, 0.9163159, 0.5975231, + 0.51167387, 0.008651535, 0.16378845, 0.93788415, 0.62142515, 0.07332315, 0.49740508, 0.21002825, + 0.15898286, 0.5021398, 0.78338593, 0.842509, 0.67814773, 0.44615123, 0.8910721, 0.81629467, + 0.39053923, 0.14259589, 0.42984807, 0.39912644, 0.61182153, 0.47850534, 0.17416, 0.94116336, + 0.5485095, 0.93614626, 0.15998314, 0.12323159, 0.27990827, 0.10008287, 0.6817622, 0.34777302, + 0.4429782, 0.9033245, 0.92599523, 0.39911312, 0.57960767, 0.09879101, 0.6715905, 0.4293604, + 0.1065447, 0.55373114, 0.72755545, 0.13469236, 0.06490368, 0.89501894, 0.4901958, 0.20424834, + 0.9143371, 0.4943057, 0.24249884, 0.093760885, 0.98119396, 0.5171895, 0.98570156, 0.03316852, + 0.83449155, 0.22262509, 0.38937467, 0.6852789, 0.91334003, 0.3741735, 0.93012, 0.05889999, + 0.8203776, 0.43561292, 0.3995308, 0.77482325, 0.52015597, 0.491959, 0.23668702, 0.29174823, + 0.47100535, 0.0004876647, 0.29258174, 0.058090426, 0.75094986, 0.039467655, 0.8762597, 0.65349054, + 0.44595045, 0.9557348, 0.20889449, 0.78560257, 0.857584, 0.5880013, 0.36657903, 0.9257887, + 0.917623, 0.89282674, 0.56462157, 0.35698256, 0.70941633, 0.9863116, 0.51602036, 0.7323712, + 0.62361115, 0.6686555, 0.31431475, 0.62929076, 0.4954881, 0.71537256, 0.68409234, 0.4223781, + 0.2576187, 0.9507506, 0.6227555, 0.98070633, 0.22460775, 0.9276111, 0.28221866, 0.79502386, + 0.34636542, 0.73588413, 0.23932843, 0.95760524, 0.165279, 0.1445174, 0.20131597, 0.23237628, + 0.069033906, 0.47374207, 0.85720026, 0.62732923, 0.9273374, 0.8797045, 0.5823319, 0.48469374, + 0.48446727, 0.5602105, 0.43447927, 0.08229436, 0.7251529, 0.24696892, 0.15800244, 0.7305779, + 0.27164242, 0.78651637, 0.52798384, 0.9068334, 0.9652458, 0.3858727, 0.701181, 0.9900118, + 0.61060804, 0.7695977, 0.010617126, 0.97353226, 0.74698323, 0.5584152, 0.56709224, 0.47909376, + 0.46733952, 0.08193848, 0.56025684, 0.021746036, 0.8581723, 0.056763105, 0.49504068, 0.37791422, + 0.36841872, 0.13806179, 0.49623904, 0.66439724, 0.49313185, 0.19992432, 0.06987098, 0.09939649, + 0.5778817, 0.50875056, 0.6859628, 0.3787626, 0.6165335, 0.29448256, 0.2671305, 0.6831612, + 0.77256113, 0.86718845, 0.016721206, 0.1577397, 0.86908734, 0.60879964, 0.73771054, 0.9260521, + 0.9931183, 0.9553855, 0.6149548, 0.6432144, 0.6867121, 0.1362564, 0.8724056, 0.21487932, + 0.2914757, 0.15006965, 0.53841466, 0.827184, 0.88963366, 0.03678374, 0.49687997, 0.41068372, + 0.69972676, 0.9112206, 0.39565054, 0.23823264, 0.8724524, 0.18832962, 0.8625602, 0.17285694, + 0.814808, 0.87709564, 0.24918492, 0.99098384, 0.0400419, 0.337301, 0.50882685, 0.7596191, + 0.4003513, 0.5701869, 0.67127895, 0.5377463, 0.58496946, 0.42665657, 0.4126844, 0.4416253, + 0.63634497, 0.47108346, 0.08728689, 0.4664639, 0.75606793, 0.4399465, 0.79352754, 0.7357774, + 0.3703085, 0.6060375, 0.45801297, 0.9578667, 0.2131491, 0.49947786, 0.05359975, 0.8047887, + 0.092825316, 0.4420979, 0.82840645, 0.80961645, 0.8870715, 0.88142174, 0.17483743, 0.95417476, + 0.6412428, 0.7787956, 0.4268327, 0.31944674, 0.3655048, 0.9591336, 0.82571423, 0.2730702, + 0.49853623, 0.95402527, 0.6018877, 0.4013689, 0.10104273, 0.39609635, 0.41678905, 0.37486148, + 0.083568096, 0.5134075, 0.6206753, 0.43400443, 0.879288, 0.5509602, 0.54647, 0.9008734, + 0.5165872, 0.86649024, 0.44492102, 0.14287159, 0.59825015, 0.60306793, 0.5545538, 0.7549232, + 0.29624605, 0.13311216, 0.8252211, 0.97727233, 0.013113789, 0.4740808, 0.37027258, 0.41117483, + 0.7803232, 0.18494278, 0.45933047, 0.25912383, 0.89759016, 0.65223086, 0.70374596, 0.696729, + 0.02530885, 0.45354494, 0.72604835, 0.37366393, 0.2607464, 0.740833, 0.07488672, 0.09028263, + 0.23232558, 0.5259593, 0.80285954, 0.49901456, 0.5142126, 0.6828427, 0.67482007, 0.8954683, + 0.39947143, 0.8469645, 0.10512285, 0.96793056, 0.5708752, 0.43951672, 0.3617477, 0.6094873, + 0.14313498, 0.2095005, 0.6536812, 0.69434524, 0.09162968, 0.28734615, 0.0032832306, 0.86435634, + 0.1627443, 0.748192, 0.11756273, 0.14470519, 0.8770196, 0.1808899, 0.49417683, 0.55541307, + 0.05822544, 0.73493844, 0.7449467, 0.48715448, 0.67122126, 0.871258, 0.8969622, 0.097480536, + 0.5101227, 0.5638622, 0.8596524, 0.050625734, 0.547108, 0.7358154, 0.12585375, 0.5857921, + 0.09179724, 0.11656108, 0.23052894, 0.051245883, 0.08715177, 0.38054147, 0.99865294, 0.9449794, + 0.52267605, 0.93850327, 0.33627024, 0.7660206, 0.56527996, 0.5301148, 0.018448701, 0.21858154, + 0.3527876, 0.5497098, 0.90970516, 0.8359368, 0.69457, 0.8745932, 0.93826604, 0.27187696, + 0.3125383, 0.5562007, 0.1842225, 0.5277675, 0.42769375, 0.9526575, 0.3172483, 0.42692894, + 0.6223383, 0.5317706, 0.05290796, 0.7604585, 0.95036095, 0.44293094, 0.46826127, 0.67768395, + 0.7362855, 0.7999673, 0.96447843, 0.732718, 0.53498775, 0.13094164, 0.5322006, 0.9800079, + 0.5454135, 0.64107084, 0.6978381, 0.9973982, 0.82611024, 0.28991696, 0.8912221, 0.21720403, + 0.17829505, 0.95865196, 0.7387076, 0.5309511, 0.19631897, 0.47088546, 0.5172857, 0.5700186, + 0.6212549, 0.90934134, 0.14368229, 0.033509336, 0.4772069, 0.25799018, 0.26822057, 0.9098567, + 0.08144851, 0.23202117, 0.09965124, 0.8946027, 0.91011477, 0.20554802, 0.7368892, 0.18159665, + 0.024000084, 0.20421462, 0.982354, 0.7866229, 0.2548194, 0.31985012, 0.6008187, 0.33242133, + 0.64054847, 0.8357039, 0.58216345, 0.991709, 0.70422333, 0.93731016, 0.481365, 0.26540005, + 0.2826816, 0.39445987, 0.1114631, 0.6256465, 0.9872593, 0.49869126, 0.502801, 0.2874233, + 0.37285027, 0.78798145, 0.9159497, 0.5940891, 0.19026573, 0.99661946, 0.30708927, 0.972747, + 0.22176278, 0.55711097, 0.50695103, 0.99210435, 0.48853147, 0.73066276, 0.31519917, 0.3014048, + 0.30852264, 0.81126094, 0.39296088, 0.641503, 0.6758267, 0.27651158, 0.20563333, 0.14413832, + 0.7506562, 0.83425117, 0.6119211, 0.5156549, 0.094084926, 0.111242734, 0.1943373, 0.52530885, + 0.70141363, 0.6949307, 0.41377264, 0.46683794, 0.4039004, 0.006729609, 0.14215559, 0.643929, + 0.52861464, 0.6094164, 0.7699462, 0.1471124, 0.43035918, 0.4892606, 0.7768686, 0.5520188, + 0.07926069, 0.8100583, 0.31712383, 0.17599839, 0.105730385, 0.861298, 0.6115966, 0.096338674, + 0.5823481, 0.77181137, 0.8434329, 0.35601455, 0.38469836, 0.79143435, 0.8786621, 0.11052005, + 0.36277366, 0.9816422, 0.29069075, 0.7936008, 0.31689015, 0.84836125, 0.8975044, 0.30179304, + 0.66910535, 0.7490319, 0.1128883, 0.06641029, 0.5065654, 0.058520928, 0.71377915, 0.26139554, + 0.057382602, 0.059902266, 0.4363942, 0.28402662, 0.7941189, 0.018338913, 0.41957843, 0.84011555, + 0.083334126, 0.31743395, 0.88448983, 0.632089, 0.16329671, 0.78614104, 0.2592306, 0.7371803, + 0.7307543, 0.65942615, 0.7843387, 0.448717, 0.19856988, 0.9832678, 0.23512867, 0.23089947, + 0.9125539, 0.015330798, 0.50689304, 0.3566985, 0.74840975, 0.5451863, 0.5897733, 0.5238272, + 0.05803223, 0.5820373, 0.29863194, 0.3247961, 0.35504016, 0.5946355, 0.31640115, 0.34443474, + 0.56206375, 0.45057517, 0.71026665, 0.99945617, 0.9638714, 0.26541534, 0.13849631, 0.8829643, + 0.48980126, 0.375708, 0.33565596, 0.84713924, 0.2741822, 0.26506215, 0.06282568, 0.07411481, + 0.8247736, 0.20549475, 0.37147272, 0.7787881, 0.5114459, 0.06287994, 0.09170583, 0.53814787, + 0.72766066, 0.36066267, 0.5740568, 0.58125937, 0.4875091, 0.93443453, 0.38214013, 0.13611887, + 0.343025, 0.439904, 0.88665324, 0.7479947, 0.27300113, 0.23567249, 0.26702806, 0.64713854, + 0.8768345, 0.62392867, 0.8668972, 0.37270173, 0.20953032, 0.74263406, 0.249645, 0.79297006, + 0.51921165, 0.22451714, 0.50002253, 0.14954542, 0.22316273, 0.53761303, 0.83298886, 0.4991838, + 0.35886934, 0.17211881, 0.2717955, 0.6032087, 0.6913585, 0.5572369, 0.3954552, 0.55536675, + 0.9935679, 0.19953707, 0.5041142, 0.83427817, 0.3784089, 0.314831, 0.80111367, 0.58910114, + 0.93846667, 0.7243342, 0.90195364, 0.8875172, 0.19598271, 0.7190041, 0.3286175, 0.9850266, + 0.11101766, 0.78108674, 0.06204771, 0.26299196, 0.434412, 0.23259473, 0.9129562, 0.805412, + 0.6069152, 0.38746944, 0.38912535, 0.10088234, 0.96387696, 0.6638193, 0.95578, 0.31959754, + 0.22847345, 0.3115305, 0.37913388, 0.009993258, 0.23851983, 0.4153668, 0.41456118, 0.20438069, + 0.42340347, 0.9109214, 0.21107873, 0.49882856, 0.6356594, 0.94547164, 0.3032011, 0.6398653, + 0.84350127, 0.28676888, 0.49219108, 0.91027176, 0.49518922, 0.13246326, 0.120954745, 0.76097316, + 0.28658092, 0.6987022, 0.22736304, 0.99093944, 0.9257056, 0.7002313, 0.6252242, 0.27464733, + 0.76855415, 0.5823561, 0.6590438, 0.8844522, 0.3398702, 0.31862426, 0.7465068, 0.6956509, + 0.36652556, 0.857667, 0.8395885, 0.5234906, 0.021515984, 0.4141276, 0.16975257, 0.66144353, + 0.084268354, 0.74926007, 0.25738105, 0.67710805, 0.17162827, 0.045508236, 0.8244083, 0.0960102, + 0.19057575, 0.6181607, 0.72341233, 0.5398176, 0.18800376, 0.4236217, 0.27867505, 0.7231721, + 0.28569725, 0.9364314, 0.73027444, 0.05330333, 0.28642786, 0.4187489, 0.29999506, 0.524877, + 0.5402621, 0.7965402, 0.54374623, 0.6375222, 0.29287475, 0.59746414, 0.73945713, 0.87245333, + 0.5289497, 0.56591946, 0.9066711, 0.17644554, 0.4428503, 0.94811606, 0.10301907, 0.7230459, + 0.75794774, 0.5630336, 0.69387645, 0.7217095, 0.5952119, 0.20668921, 0.5076471, 0.9429038, + 0.57899195, 0.116416365, 0.23779334, 0.08508458, 0.6838532, 0.11644924, 0.3750157, 0.6655195, + 0.44926503, 0.73250407, 0.13684598, 0.37508807, 0.50176203, 0.1868861, 0.80313545, 0.59311163, + 0.8787036, 0.850959, 0.0108679095, 0.62208426, 0.5169506, 0.10222952, 0.28032187, 0.3375812, + 0.83341235, 0.0072284974, 0.2953556, 0.7233943, 0.7248724, 0.5782856, 0.9296651, 0.3335729, + 0.28889313, 0.6008424, 0.05853025, 0.17645839, 0.3596708, 0.6543726, 0.18860014, 0.41250044, + 0.19090378, 0.24115163, 0.7271805, 0.7103462, 0.8112701, 0.727931, 0.22128391, 0.5710617, + 0.7598981, 0.10076484, 0.8430059, 0.7442529, 0.1958213, 0.8855628, 0.4259532, 0.47676244, + 0.8360945, 0.90021217, 0.25167224, 0.67662466, 0.8210937, 0.6516214, 0.940647, 0.8709795, + 0.802839, 0.8032731, 0.08619493, 0.9009196, 0.12835586, 0.62667704, 0.2334408, 0.224331, + 0.6623589, 0.59836745, 0.4311805, 0.27579898, 0.37504902, 0.5699756, 0.5263111, 0.10548131, + 0.7859446, 0.72429395, 0.96349615, 0.6241076, 0.7352797, 0.18541217, 0.13775158, 0.40333033, + 0.17488916, 0.5817678, 0.34036386, 0.45945865, 0.40270033, 0.51197547, 0.59140676, 0.5392824, + 0.3005046, 0.85620105, 0.9075073, 0.007996995, 0.6417361, 0.3203643, 0.44270578, 0.13322107, + 0.86732405, 0.6186749, 0.08189404, 0.59745383, 0.4543823, 0.15015423, 0.10171343, 0.2661189, + 0.37390104, 0.14619094, 0.8906801, 0.096799746, 0.68812525, 0.31653944, 0.13569976, 0.6174268, + 0.6655215, 0.6828646, 0.72603047, 0.54658806, 0.28631318, 0.77398217, 0.8216307, 0.15038341, + 0.0069607063, 0.8918981, 0.97529435, 0.518848, 0.6624684, 0.5183141, 0.46374524, 0.4655803, + 0.28158814, 0.83027506, 0.75678355, 0.11660483, 0.10351813, 0.54029775, 0.948948, 0.024734931, + 0.48005438, 0.074244976, 0.0855576, 0.2565094, 0.62129533, 0.49460703, 0.85115707, 0.98396516, + 0.7205013, 0.2900805, 0.34247547, 0.9588715, 0.5943338, 0.89611775, 0.8469079, 0.09334188, + 0.79704416, 0.9315106, 0.59049314, 0.5624842, 0.17485987, 0.5828654, 0.60365057, 0.85558695, + 0.6824457, 0.4250998, 0.8152116, 0.8578502, 0.55975586, 0.01909494, 0.5139087, 0.12522376, + 0.73391664, 0.7012955, 0.06653367, 0.2120682, 0.6884245, 0.5651213, 0.5290881, 0.51235366, + 0.040741026, 0.9913292, 0.7983467, 0.3723879, 0.17583862, 0.50487375, 0.87124646, 0.3854704, + 0.9833672, 0.66344166, 0.31956065, 0.1720075, 0.94980466, 0.38646382, 0.8498751, 0.89718896, + 0.4705944, 0.22997065, 0.57406366, 0.19619557, 0.67939544, 0.9933069, 0.4242093, 0.70140636, + 0.7761718, 0.21725173, 0.22495484, 0.89303833, 0.82958406, 0.6348397, 0.40491733, 0.23192288, + 0.40242258, 0.07813944, 0.5217432, 0.18353066, 0.7845187, 0.23126268, 0.6797483, 0.17757194, + 0.55385333, 0.42974123, 0.874483, 0.8963142, 0.6995343, 0.34190118, 0.17541912, 0.34745282, + 0.85142046, 0.16934472, 0.7414738, 0.4584539, 0.99105763, 0.33289248, 0.8329583, 0.04743413, + 0.5671199, 0.09694037, 0.5962161, 0.9585869, 0.2799189, 0.9782081, 0.5558863, 0.3485275, + 0.25852436, 0.08763776, 0.76958495, 0.8716652, 0.86472064, 0.6663444, 0.1126702, 0.23933174, + 0.55022234, 0.39649174, 0.64234227, 0.24965419, 0.118823886, 0.5278951, 0.0018720366, 0.43427062, + 0.04183261, 0.877502, 0.04161787, 0.66023934, 0.8933659, 0.9464634, 0.24086526, 0.069530085, + 0.24518117, 0.47430903, 0.61641073, 0.6875784, 0.6350466, 0.7211614, 0.89765304, 0.5756452, + 0.87385494, 0.5259555, 0.63778985, 0.6118965, 0.5723162, 0.3037539, 0.48273215, 0.18507604, + 0.05667453, 0.5021421, 0.90823156, 0.59456587, 0.69055027, 0.5833041, 0.92861027, 0.039224792, + 0.095068336, 0.16194543, 0.9167543, 0.40241688, 0.93659025, 0.895647, 0.4551616, 0.31206095, + 0.8467725, 0.7000548, 0.62648404, 0.39041162, 0.049933646, 0.42509183, 0.6042851, 0.8290609, + 0.49883872, 0.06669706, 0.37579927, 0.5928684, 0.89010525, 0.3899755, 0.8619544, 0.7380787, + 0.39476988, 0.8565418, 0.6035648, 0.39122385, 0.038231853, 0.64629936, 0.37897983, 0.6618771, + 0.54569876, 0.577186, 0.59251004, 0.47310117, 0.8044071, 0.49523613, 0.6390549, 0.97820795, + 0.07079393, 0.3257289, 0.765124, 0.8722614, 0.6772699, 0.092320524, 0.1351424, 0.6315827, + 0.89785695, 0.07917066, 0.09572715, 0.6238532, 0.20750481, 0.33574188, 0.14911953, 0.70509285, + 0.29999104, 0.1786756, 0.0076469877, 0.08004845, 0.29208216, 0.063937746, 0.27382907, 0.20047311, + 0.32107502, 0.96460694, 0.84471285, 0.47274768, 0.8325818, 0.13118395, 0.024653764, 0.0036025788, + 0.42764217, 0.39759132, 0.52207446, 0.56437635, 0.62485147, 0.989693, 0.060808785, 0.30244938, + 0.7213994, 0.9719821, 0.49336693, 0.9590612, 0.5505722, 0.75512666, 0.4543723, 0.2099569, + 0.42806646, 0.8874172, 0.17311013, 0.6257315, 0.48758915, 0.55900645, 0.68612576, 0.0068561803, + 0.051899806, 0.56465095, 0.5511864, 0.71266294, 0.2476077, 0.6623947, 0.7990009, 0.76667297, + 0.054516893, 0.092124574, 0.19621104, 0.80991346, 0.8136675, 0.58474314, 0.08024137, 0.31029803, + 0.117866814, 0.70519763, 0.35864902, 0.32010004, 0.5705708, 0.3147679, 0.64990085, 0.56594837, + 0.51023465, 0.6347559, 0.044681232, 0.94516456, 0.9580738, 0.39892223, 0.51601344, 0.8686357, + 0.71146554, 0.51521826, 0.51247656, 0.06020054, 0.43850663, 0.3481458, 0.054841675, 0.059004717, + 0.1729812, 0.7266939, 0.9045443, 0.45844766, 0.5589156, 0.6444588, 0.39628944, 0.8433233, + 0.8071758, 0.8628121, 0.5078647, 0.78239155, 0.20035744, 0.36602575, 0.43628535, 0.7371319, + 0.91475004, 0.985238, 0.20242831, 0.61285174, 0.6177135, 0.8538363, 0.8085992, 0.65559465, + 0.57611114, 0.32757533, 0.09844793, 0.2984492, 0.07226656, 0.020040827, 0.87179136, 0.769721, + 0.65035594, 0.2996443, 0.14711884, 0.8438769, 0.4102236, 0.1914532, 0.007032739, 0.8657759, + 0.23846649, 0.20135792, 0.13798875, 0.09526171, 0.8910575, 0.7336219, 0.6682783, 0.34543982, + 0.078932896, 0.77534467, 0.14545049, 0.45326862, 0.14571752, 0.44198993, 0.44129124, 0.31914487, + 0.9180948, 0.24894963, 0.8823365, 0.23134027, 0.54601085, 0.09784024, 0.7710568, 0.787135, + 0.99102074, 0.73814374, 0.13203558, 0.90071315, 0.2189069, 0.5924085, 0.32690832, 0.7232968, + 0.97820526, 0.33665246, 0.37438527, 0.41635555, 0.71584755, 0.7133375, 0.76453716, 0.84248924, + 0.6592971, 0.7530081, 0.2195163, 0.29692188, 0.87459034, 0.41852275, 0.62400347, 0.20836602, + 0.8583531, 0.82797396, 0.9257821, 0.16127396, 0.3091167, 0.77569246, 0.31976497, 0.14062625, + 0.43030116, 0.35085374, 0.104240976, 0.15291376, 0.6015863, 0.76756513, 0.12653293, 0.48652443, + 0.44843635, 0.42215365, 0.47506335, 0.80906504, 0.06760467, 0.02493567, 0.6032973, 0.20475733, + 0.48441246, 0.039847255, 0.5720432, 0.7930028, 0.8783239, 0.47413486, 0.91254467, 0.57249796, + 0.11414025, 0.9236696, 0.042360075, 0.39093295, 0.6666264, 0.16563436, 0.41418016, 0.20251282, + 0.016887465, 0.23375902, 0.9860544, 0.36499384, 0.60909647, 0.6116234, 0.24090295, 0.891732, + 0.6264752, 0.7329919, 0.8484855, 0.45243672, 0.9434594, 0.8149384, 0.14076136, 0.8334174, + 0.22467664, 0.72102475, 0.6768615, 0.26926944, 0.20364925, 0.52676225, 0.2623023, 0.95616627, + 0.43830907, 0.531743, 0.03877351, 0.67791677, 0.72520506, 0.7356, 0.81989807, 0.282802, + 0.007973485, 0.27255052, 0.7921776, 0.8338457, 0.038881265, 0.23830348, 0.59566087, 0.872789, + 0.7989443, 0.68031126, 0.16652757, 0.14533207, 0.62564933, 0.46010798, 0.6290386, 0.29920182, + 0.7829082, 0.20894268, 0.16625631, 0.94560164, 0.48877287, 0.14491072, 0.9988636, 0.49012524, + 0.9714567, 0.029888112, 0.92668474, 0.07735347, 0.5728499, 0.5629862, 0.16652691, 0.8908752, + 0.91309386, 0.56568354, 0.44446322, 0.67090887, 0.022760825, 0.3069157, 0.7945361, 0.9863731, + 0.12536389, 0.80407244, 0.47032514, 0.523338, 0.36023465, 0.11697024, 0.33051696, 0.9782011, + 0.9027044, 0.7395717, 0.89500856, 0.51626235, 0.5693437, 0.8742964, 0.7940291, 0.86306274, + 0.27368698, 0.30205235, 0.86238897, 0.008993154, 0.31161872, 0.5183074, 0.29993913, 0.2359581, + 0.51378435, 0.27565238, 0.23223823, 0.059965752, 0.01564475, 0.9581297, 0.276441, 0.4759925, + 0.41440654, 0.17988315, 0.82023776, 0.68470037, 0.6745856, 0.47552556, 0.12989059, 0.85448647, + 0.69937116, 0.94848365, 0.17464903, 0.83327824, 0.6679777, 0.65026456, 0.32153153, 0.038797423, + 0.7716544, 0.58140045, 0.3972219, 0.7207085, 0.44452676, 0.78554296, 0.67475444, 0.6070565, + 0.50413334, 0.23436703, 0.009553685, 0.08458229, 0.884732, 0.27055123, 0.96255636, 0.9445748, + 0.46313068, 0.41901603, 0.10185582, 0.38946053, 0.05405868, 0.10932874, 0.18847717, 0.79816145, + 0.17216177, 0.007902476, 0.30962202, 0.36313507, 0.34365836, 0.46666092, 0.5679804, 0.8635198, + 0.9541208, 0.19344081, 0.2883113, 0.4342443, 0.5609078, 0.55573255, 0.03146575, 0.6288636, + 0.50512874, 0.21318124, 0.18056706, 0.44021857, 0.46597186, 0.045308296, 0.96975446, 0.42881992, + 0.9859273, 0.23007429, 0.37014756, 0.24896163, 0.54840875, 0.932071, 0.98473877, 0.6623257, + 0.39292327, 0.5990605, 0.5485467, 0.4366243, 0.47592095, 0.31161934, 0.26339814, 0.037472416, + 0.6663866, 0.1460339, 0.13046144, 0.6912912, 0.9822399, 0.528312, 0.38366696, 0.90739816, + 0.3875503, 0.47299224, 0.88433176, 0.8408774, 0.92876166, 0.7482586, 0.33218956, 0.12685347, + 0.038148023, 0.8808021, 0.37720776, 0.11358407, 0.09651337, 0.3190188, 0.31511107, 0.022049852, + 0.20870206, 0.6259856, 0.041321024, 0.9618473, 0.007185834, 0.5948415, 0.15294261, 0.19350938, + 0.9497831, 0.14309464, 0.77383196, 0.31993797, 0.91484684, 0.27846324, 0.44658, 0.45761526, + 0.8464073, 0.46274942, 0.86141133, 0.075416476, 0.0477392, 0.14386131, 0.733564, 0.64466465, + 0.26687092, 0.42169324, 0.39847627, 0.5951189, 0.9344116, 0.14981407, 0.94095904, 0.3473678, + 0.83092284, 0.108411595, 0.48258916, 0.3562543, 0.48699102, 0.42181966, 0.9002123, 0.7927088, + 0.32004964, 0.6908224, 0.8910943, 0.78566706, 0.9744266, 0.012251603, 0.21200661, 0.7596848, + 0.4342221, 0.9195925, 0.26717675, 0.63376397, 0.45760745, 0.2396946, 0.97431064, 0.06484076, + 0.8924216, 0.39665636, 0.6949764, 0.5854926, 0.1963652, 0.5578238, 0.2590978, 0.799969, + 0.2021356, 0.42646417, 0.48901513, 0.8064353, 0.7958741, 0.0903257, 0.9706242, 0.42458767, + 0.56253713, 0.068702534, 0.75536686, 0.3569168, 0.25276697, 0.94789696, 0.670238, 0.2546193, + 0.2096866, 0.6387915, 0.16089676, 0.01481907, 0.8826373, 0.3071951, 0.8897603, 0.59122825, + 0.13410094, 0.4177484, 0.4638327, 0.09033466, 0.72684324, 0.3147197, 0.5963436, 0.76222587, + 0.43172458, 0.091125324, 0.58353144, 0.5479625, 0.52323645, 0.40557137, 0.9638107, 0.3438964, + 0.9489683, 0.8425891, 0.07122685, 0.38890493, 0.48432773, 0.61739385, 0.8120738, 0.9445246, + 0.7264184, 0.4403571, 0.375806, 0.55757374, 0.396927, 0.24427874, 0.9173317, 0.8949405, + 0.5367038, 0.8977869, 0.6723343, 0.3781257, 0.626493, 0.88028955, 0.6977444, 0.24781741, + 0.4723589, 0.993141, 0.9251922, 0.16164163, 0.36436552, 0.12227554, 0.73138285, 0.80411524, + 0.6749808, 0.8170004, 0.06585078, 0.040048227, 0.23596825, 0.5008554, 0.10690048, 0.51670706, + 0.6056746, 0.5193081, 0.3639163, 0.28648618, 0.9389137, 0.03876988, 0.36529887, 0.18744585, + 0.17379361, 0.68859094, 0.011258623, 0.62544954, 0.733237, 0.585685, 0.7174034, 0.06867873, + 0.14484468, 0.82340944, 0.916546, 0.49118677, 0.6922017, 0.65043217, 0.58015907, 0.60414284, + 0.70897424, 0.57169074, 0.8825929, 0.5799266, 0.17842796, 0.8772835, 0.65897226, 0.03584844, + 0.7908864, 0.15562724, 0.7724511, 0.10718488, 0.5163733, 0.41125825, 0.3089037, 0.43358904, + 0.62784207, 0.73774636, 0.98784804, 0.6757746, 0.111016914, 0.10593328, 0.07087821, 0.08929581, + 0.09959695, 0.99717206, 0.89520353, 0.4125588, 0.5843094, 0.6157137, 0.82450545, 0.95524246, + 0.939149, 0.7597735, 0.5775119, 0.36722296, 0.15617695, 0.78537226, 0.009017896, 0.29651013, + 0.029618707, 0.97541016, 0.83456314, 0.5776098, 0.8132339, 0.6102185, 0.55230546, 0.73358643, + 0.51450574, 0.48295695, 0.86334467, 0.9544553, 0.6625841, 0.90438455, 0.49312592, 0.603041, + 0.50081253, 0.7932971, 0.4803297, 0.1812559, 0.9820799, 0.24641345, 0.45153904, 0.1751727, + 0.3311218, 0.81720865, 0.16803588, 0.7565998, 0.8337463, 0.9416807, 0.2774121, 0.8424698, + 0.7287285, 0.6913379, 0.64615583, 0.13560674, 0.27137014, 0.4932684, 0.27606192, 0.48937842, + 0.4448666, 0.16161712, 0.89805305, 0.10135246, 0.75236905, 0.87005013, 0.29265827, 0.034764472, + 0.26664755, 0.9744709, 0.86641043, 0.3628798, 0.30504256, 0.827762, 0.31443018, 0.7832053, + 0.5238711, 0.65939045, 0.246488, 0.9960252, 0.44218266, 0.7957057, 0.8998401, 0.572825, + 0.20554484, 0.020874852, 0.22572684, 0.97124624, 0.2582287, 0.35751918, 0.33167085, 0.007544129, + 0.5172352, 0.99095124, 0.73638934, 0.8204628, 0.34836042, 0.3501866, 0.4228037, 0.46107167, + 0.5245504, 0.1332714, 0.48995224, 0.8592754, 0.07527029, 0.91453224, 0.53742725, 0.90096647, + 0.3769077, 0.8629506, 0.6117356, 0.61197966, 0.2467804, 0.2800367, 0.047195755, 0.6491609, + 0.261777, 0.32522804, 0.8958076, 0.7314942, 0.6443233, 0.32141203, 0.7765358, 0.90912837, + 0.6428001, 0.85886633, 0.8456446, 0.31409132, 0.09137268, 0.49396735, 0.43484485, 0.17368458, + 0.23658675, 0.78541636, 0.47147486, 0.30891126, 0.30575344, 0.040564716, 0.49755472, 0.2910126, + 0.48344758, 0.32476038, 0.59433854, 0.39527807, 0.7457836, 0.71969116, 0.76076376, 0.23719852, + 0.9437555, 0.087228395, 0.55868584, 0.023132376, 0.45437896, 0.6913095, 0.8167484, 0.20313835, + 0.35673562, 0.58082384, 0.2164753, 0.21640398, 0.06888765, 0.22333595, 0.8095938, 0.88294035, + 0.42810574, 0.43805102, 0.37539294, 0.46136406, 0.80856186, 0.7382845, 0.34340748, 0.2212123, + 0.8276733, 0.60479504, 0.24804658, 0.3195629, 0.7270735, 0.3812577, 0.16334477, 0.92310894, + 0.09810257, 0.6084461, 0.37033582, 0.004144284, 0.9352815, 0.41171247, 0.71930563, 0.54527724, + 0.968668, 0.2683365, 0.9521756, 0.7249296, 0.8240894, 0.28115076, 0.22212493, 0.26011166, + 0.5151666, 0.71139824, 0.9671723, 0.3077326, 0.3442982, 0.29939967, 0.42863667, 0.20547101, + 0.7438209, 0.33747354, 0.19545908, 0.8495839, 0.44326293, 0.49718547, 0.4760649, 0.97547793, + 0.4174791, 0.29336637, 0.11830141, 0.46044156, 0.85300016, 0.8054495, 0.9476588, 0.016393282, + 0.7187454, 0.8301157, 0.49269608, 0.5402253, 0.78610885, 0.6184779, 0.39712286, 0.54652256, + 0.3826701, 0.98793495, 0.80439633, 0.015675247, 0.4140854, 0.85561216, 0.5788107, 0.7987029, + 0.17980942, 0.16486481, 0.26032335, 0.597808, 0.2162534, 0.86972165, 0.102014296, 0.47148252, + 0.7922716, 0.97669774, 0.3074505, 0.53072304, 0.16284934, 0.7616834, 0.40711153, 0.7097171, + 0.7637394, 0.950779, 0.58898723, 0.5141825, 0.8067036, 0.88841134, 0.41936216, 0.12534304, + 0.94035065, 0.6489365, 0.46691382, 0.45532802, 0.69278914, 0.46038964, 0.56139255, 0.56186694, + 0.7145557, 0.31959853, 0.28063214, 0.6881353, 0.54512614, 0.3498508, 0.8001399, 0.8490237, + 0.7281014, 0.021213572, 0.7479538, 0.8094111, 0.31102738, 0.8663998, 0.38367322, 0.6209867, + 0.5808234, 0.09467922, 0.25193584, 0.46330634, 0.26662496, 0.06462818, 0.99199927, 0.29139808, + 0.74550265, 0.13498032, 0.65745735, 0.5673169, 0.40280786, 0.64668626, 0.7786934, 0.33188194, + 0.4153052, 0.7455836, 0.8161674, 0.8432508, 0.48105124, 0.7189762, 0.16459095, 0.41388863, + 0.15063916, 0.73996353, 0.78608114, 0.78549004, 0.14045759, 0.609951, 0.8143157, 0.07395084, + 0.26526332, 0.8459271, 0.8745046, 0.5981099, 0.20845382, 0.098086186, 0.29524195, 0.6499275, + 0.32759923, 0.98923403, 0.9426327, 0.41014582, 0.6923934, 0.23282301, 0.44621587, 0.08141512, + 0.24252021, 0.4160718, 0.3941059, 0.5654438, 0.050232418, 0.5404224, 0.13993548, 0.8618472, + 0.9300883, 0.8380472, 0.31266716, 0.52666146, 0.27854705, 0.20650926, 0.1509405, 0.13555165, + 0.32066464, 0.5835065, 0.30205357, 0.5568808, 0.7721817, 0.18058343, 0.123428136, 0.31721902, + 0.45034164, 0.16623993, 0.5156516, 0.4918172, 0.7763435, 0.75444514, 0.7214952, 0.91781616, + 0.29374766, 0.704666, 0.5429698, 0.7243858, 0.21584511, 0.24887188, 0.02371842, 0.7248409, + 0.7059916, 0.012657363, 0.6680217, 0.37040663, 0.785419, 0.7685805, 0.37138042, 0.12108998, + 0.83829355, 0.80708104, 0.08948117, 0.108886935, 0.93076944, 0.8893351, 0.30923343, 0.061936773, + 0.29264367, 0.07688689, 0.11510216, 0.8839925, 0.02477082, 0.64811826, 0.08550372, 0.17564313, + 0.11655201, 0.39485103, 0.23291379, 0.57388103, 0.6635394, 0.42655468, 0.9197065, 0.071792774, + 0.5597881, 0.57721263, 0.8508891, 0.75952435, 0.5125618, 0.75302154, 0.53180003, 0.6817611, + 0.79485947, 0.3945616, 0.6535236, 0.9692625, 0.66496396, 0.61260825, 0.98704666, 0.40441254, + 0.3954326, 0.48103306, 0.43174213, 0.13895822, 0.13376972, 0.13972592, 0.7000701, 0.05787335, + 0.92715365, 0.49237853, 0.2538546, 0.390568, 0.5356667, 0.7974994, 0.45755056, 0.41173887, + 0.8873745, 0.017688395, 0.54909885, 0.3535568, 0.038445998, 0.54970914, 0.549375, 0.5396221, + 0.54508686, 0.43334106, 0.089132994, 0.6302092, 0.99459463, 0.11624123, 0.5106792, 0.50394374, + 0.40780434, 0.8285013, 0.17844845, 0.18250638, 0.99481255, 0.7807483, 0.93802303, 0.42006215, + 0.87714255, 0.7930158, 0.8323707, 0.020183232, 0.4991669, 0.14123203, 0.1460944, 0.9973601, + 0.93701106, 0.24178477, 0.081888, 0.64727557, 0.06350941, 0.6334899, 0.36596653, 0.84572345, + 0.931658, 0.89212, 0.59387136, 0.70042866, 0.050592937, 0.06986087, 0.063278705, 0.81091243, + 0.98169935, 0.74991083, 0.98276365, 0.7071655, 0.6190509, 0.27504414, 0.41692632, 0.106626175, + 0.07966534, 0.12903668, 0.47641423, 0.24543023, 0.71733844, 0.5291918, 0.040455237, 0.40385485, + 0.28724664, 0.091772884, 0.69319814, 0.7528099, 0.034353238, 0.8634036, 0.44043434, 0.77431446, + 0.46253473, 0.332725, 0.25084835, 0.10269255, 0.18687698, 0.23759438, 0.36946923, 0.8072817, + 0.72973704, 0.021458272, 0.038483858, 0.7492561, 0.1584684, 0.43892893, 0.37830916, 0.6619669, + 0.8248584, 0.9752618, 0.5676102, 0.93447274, 0.15707563, 0.120536305, 0.12838502, 0.40246627, + 0.8516648, 0.19001648, 0.41318202, 0.95882004, 0.3766627, 0.31046882, 0.7765592, 0.11829578, + 0.3094765, 0.20844917, 0.24463072, 0.28632593, 0.024195805, 0.31423378, 0.9197492, 0.84207094, + 0.75956744, 0.66913253, 0.5156932, 0.6958802, 0.4907079, 0.29119918, 0.24538647, 0.8483177, + 0.7134637, 0.031231258, 0.92795146, 0.059091415, 0.29579335, 0.5059616, 0.6172388, 0.34199843, + 0.20433997, 0.84838206, 0.2510278, 0.9968605, 0.82441235, 0.41064918, 0.43061897, 0.41926822, + 0.2448991, 0.92018807, 0.43977955, 0.95001924, 0.19429821, 0.09198324, 0.63777107, 0.51062465, + 0.055512622, 0.72553927, 0.17490527, 0.48794308, 0.60484314, 0.43250486, 0.91175836, 0.5604656, + 0.94463, 0.56486434, 0.24535634, 0.34543145, 0.38251737, 0.7174677, 0.82250243, 0.8035149, + 0.59121037, 0.9026323, 0.081985965, 0.17581372, 0.06320599, 0.9228887, 0.017658591, 0.3489183, + 0.23851357, 0.096424945, 0.45098105, 0.57051986, 0.8514196, 0.29536724, 0.6540195, 0.62148046, + 0.39346015, 0.41732678, 0.0035787956, 0.5702541, 0.33105636, 0.12929575, 0.7371553, 0.7718351, + 0.93662375, 0.6905622, 0.052230474, 0.25954804, 0.16529284, 0.08518753, 0.03675085, 0.52743137, + 0.097685665, 0.6362647, 0.35880888, 0.2916659, 0.009997273, 0.46195737, 0.4474187, 0.13262391, + 0.7078807, 0.825987, 0.24942951, 0.5084182, 0.9815238, 0.3412385, 0.70904595, 0.6492628, + 0.9108448, 0.62387586, 0.9519713, 0.9651906, 0.71388894, 0.25224832, 0.4724585, 0.4619146, + 0.16547702, 0.31015086, 0.23919, 0.37264377, 0.8706582, 0.7581105, 0.18362544, 0.15332605, + 0.05967409, 0.9235497, 0.47283417, 0.21515496, 0.93655837, 0.3623536, 0.6114832, 0.93150276, + 0.9699081, 0.8709549, 0.8623734, 0.5050694, 0.87986624, 0.2287371, 0.7903113, 0.5953852, + 0.98151624, 0.40296772, 0.34870324, 0.541417, 0.13321623, 0.07156025, 0.81354237, 0.84543735, + 0.16380614, 0.8968943, 0.12618889, 0.6998464, 0.22276738, 0.07477489, 0.2619657, 0.94977015, + 0.6423615, 0.09610346, 0.4487441, 0.05797409, 0.8684043, 0.49389097, 0.7127044, 0.54849124, + 0.012392659, 0.020468513, 0.99528253, 0.8429341, 0.3898749, 0.96738917, 0.58204836, 0.9367399, + 0.5198395, 0.6438048, 0.39112753, 0.46769053, 0.40940732, 0.64220846, 0.02010981, 0.9881138, + 0.11000732, 0.6273968, 0.051348828, 0.039664086, 0.2361647, 0.91163677, 0.7087354, 0.8951332, + 0.6089892, 0.91260326, 0.86270785, 0.7837628, 0.779993, 0.73233724, 0.72698087, 0.48762527, + 0.69026333, 0.800212, 0.5290243, 0.11274772, 0.07627774, 0.9706083, 0.45556244, 0.19641699, + 0.31484595, 0.18944897, 0.18000686, 0.5789626, 0.6836474, 0.79427516, 0.54036283, 0.00015307916, + 0.07599365, 0.46063024, 0.94796675, 0.24100749, 0.44254217, 0.67304033, 0.31232652, 0.10075587, + 0.31173313, 0.100149296, 0.23394488, 0.47727165, 0.10468131, 0.79828554, 0.1567469, 0.78750235, + 0.9168239, 0.9035022, 0.7774272, 0.6091953, 0.11318414, 0.9073621, 0.9118361, 0.139399, + 0.17183441, 0.85493183, 0.7248181, 0.04671574, 0.7316299, 0.1297728, 0.21148583, 0.814714, + 0.37224042, 0.8625547, 0.70776916, 0.31936276, 0.7843705, 0.4859734, 0.04508312, 0.017223012, + 0.4878855, 0.42826846, 0.8010146, 0.97612846, 0.73666346, 0.9782908, 0.09173568, 0.51656044, + 0.032702066, 0.3925045, 0.6621387, 0.7801451, 0.01684795, 0.93116754, 0.886969, 0.16863157, + 0.54879415, 0.80856776, 0.06917309, 0.5876103, 0.94822216, 0.26561078, 0.36912593, 0.18196031, + 0.8886635, 0.41923082, 0.1050312, 0.24212655, 0.09051639, 0.8373841, 0.0031318855, 0.4308505, + 0.8584191, 0.7602042, 0.121309794, 0.68491566, 0.10634747, 0.9357077, 0.4027356, 0.19354361, + 0.7631962, 0.2082577, 0.014013676, 0.3391254, 0.46763408, 0.43134072, 0.7978661, 0.44107288, + 0.9755858, 0.5391376, 0.7705686, 0.9758027, 0.4168003, 0.4574728, 0.06900084, 0.22227472, + 0.059142508, 0.6190543, 0.08746498, 0.3174326, 0.8732596, 0.84960914, 0.42604402, 0.19531794, + 0.38937265, 0.2312882, 0.921726, 0.25664374, 0.8098577, 0.20205325, 0.06228409, 0.61308646, + 0.40583217, 0.8756295, 0.8244142, 0.7399645, 0.2515971, 0.030000538, 0.7143262, 0.45732272, + 0.6213647, 0.6639583, 0.26654074, 0.5513788, 0.0668155, 0.02732918, 0.014050223, 0.40094635, + 0.69120336, 0.8990351, 0.6257732, 0.48729318, 0.8482427, 0.08530297, 0.320284, 0.91358703, + 0.7822137, 0.8186957, 0.94975275, 0.2363459, 0.50961477, 0.54122233, 0.63121516, 0.77353257, + 0.4768535, 0.15748215, 0.56997055, 0.54117084, 0.6330586, 0.32903638, 0.9706776, 0.02914197, + 0.90472806, 0.6301423, 0.69606787, 0.20930128, 0.5830684, 0.8746652, 0.12850243, 0.36204344, + 0.21723796, 0.5207796, 0.5654404, 0.9108227, 0.57628006, 0.5749909, 0.7648438, 0.3205292, + 0.5553455, 0.91082716, 0.9577508, 0.43290135, 0.08024777, 0.47798032, 0.94770795, 0.0801424, + 0.03274318, 0.49300817, 0.07452531, 0.90933335, 0.45735866, 0.4728794, 0.7678877, 0.362167, + 0.9283575, 0.5966312, 0.5825651, 0.21810043, 0.3892351, 0.11098274, 0.33051863, 0.9075484, + 0.6901933, 0.5877093, 0.019107932, 0.9888351, 0.9757819, 0.72039247, 0.19725248, 0.90186256, + 0.39263836, 0.24944134, 0.98582536, 0.72223145, 0.3712856, 0.5377763, 0.9488942, 0.42674774, + 0.68243426, 0.6159255, 0.1765581, 0.09006023, 0.8001399, 0.21916907, 0.9046848, 0.74435854, + 0.7528919, 0.20327342, 0.9824652, 0.9796489, 0.9924258, 0.5467434, 0.9312941, 0.44436273, + 0.58030856, 0.05020233, 0.742708, 0.49253845, 0.4588724, 0.95887285, 0.10436046, 0.31235072, + 0.29575568, 0.17266272, 0.516695, 0.20791732, 0.48705408, 0.045656245, 0.9908814, 0.3905812, + 0.647737, 0.15581739, 0.5356661, 0.77330965, 0.93442464, 0.2404584, 0.10740854, 0.47102425, + 0.6830245, 0.27474937, 0.2359432, 0.7725085, 0.73792726, 0.21760361, 0.9094368, 0.845895, + 0.31814724, 0.5414626, 0.14192294, 0.32108325, 0.7950682, 0.45635575, 0.96787536, 0.72356147, + 0.511565, 0.8642074, 0.79430455, 0.62747717, 0.70247406, 0.6967675, 0.2573045, 0.7072357, + 0.212392, 0.591884, 0.33191186, 0.8366084, 0.01107724, 0.15798447, 0.5099381, 0.33985013, + 0.9427938, 0.27168378, 0.8095139, 0.18412302, 0.72292966, 0.33185193, 0.5744235, 0.078152075, + 0.2632259, 0.67080003, 0.8897701, 0.94559145, 0.9037333, 0.66979814, 0.595513, 0.19138126, + 0.18794204, 0.8121047, 0.26174462, 0.07021725, 0.44615385, 0.47993135, 0.76855016, 0.986257, + 0.017444894, 0.5287075, 0.5601165, 0.1460432, 0.88569176, 0.07282839, 0.8348177, 0.16016278, + 0.031524524, 0.80207276, 0.37828946, 0.52338445, 0.6468418, 0.7837523, 0.00063179433, 0.17971309, + 0.2897839, 0.7161524, 0.3642513, 0.031674027, 0.8069974, 0.31171304, 0.8035024, 0.54259384, + 0.9963711, 0.14053062, 0.6486664, 0.19897254, 0.8962398, 0.43972084, 0.8936963, 0.46286246, + 0.5031336, 0.8232569, 0.16667813, 0.19422211, 0.7717354, 0.42838028, 0.19246033, 0.19039753, + 0.8359823, 0.7296073, 0.9140669, 0.10166052, 0.29150867, 0.07212853, 0.54453945, 0.40418974, + 0.8114729, 0.08203155, 0.78043336, 0.7300014, 0.11568007, 0.73687613, 0.1792596, 0.70573187, + 0.7252052, 0.017522655, 0.14967212, 0.7451611, 0.42416203, 0.6358452, 0.26392296, 0.59180367, + 0.9083765, 0.915427, 0.020250821, 0.8235849, 0.6170742, 0.80640966, 0.40797767, 0.86140364, + 0.52369213, 0.17385374, 0.19569172, 0.07739012, 0.3976461, 0.70184183, 0.2510852, 0.92424256, + 0.59599113, 0.24447663, 0.38749963, 0.81420827, 0.6592875, 0.16369487, 0.34718236, 0.76625746, + 0.6439973, 0.46094626, 0.46901694, 0.75421274, 0.27870816, 0.44729918, 0.76623553, 0.20013711, + 0.46568435, 0.32226324, 0.193284, 0.37608168, 0.051877704, 0.72095454, 0.7871155, 0.0050632227, + 0.6740539, 0.9190297, 0.20630927, 0.94182634, 0.5411844, 0.10186948, 0.30808574, 0.023363324, + 0.7664375, 0.22542956, 0.14916998, 0.17968538, 0.24834555, 0.44971466, 0.93251616, 0.74468166, + 0.56824464, 0.25399336, 0.17958756, 0.15612793, 0.33739275, 0.6537649, 0.5826955, 0.07639295, + 0.40761822, 0.9955546, 0.6117058, 0.07538286, 0.50855786, 0.8750035, 0.8723649, 0.8750366, + 0.4573611, 0.38243642, 0.1401544, 0.7402578, 0.9573856, 0.40535605, 0.22507304, 0.54212785, + 0.1528605, 0.44565362, 0.98777527, 0.05327858, 0.2981292, 0.5865501, 0.9517916, 0.015969688, + 0.38974705, 0.44860238, 0.807837, 0.79788435, 0.541367, 0.6309876, 0.6676705, 0.02028897, + 0.33633423, 0.12991633, 0.5342081, 0.5456298, 0.4901637, 0.2327029, 0.5148055, 0.89143395, + 0.35306472, 0.27413338, 0.7223243, 0.86590916, 0.30956024, 0.1922584, 0.787296, 0.1628886, + 0.02892033, 0.6374597, 0.0032674163, 0.89173913, 0.66598964, 0.5294169, 0.77826375, 0.8210681, + 0.043763056, 0.5957361, 0.6856358, 0.05995547, 0.06716649, 0.07448051, 0.3336696, 0.8263735, + 0.7147659, 0.11986544, 0.40392354, 0.8274693, 0.87114793, 0.67944324, 0.051964145, 0.9201576, + 0.9308481, 0.096341334, 0.70021385, 0.02399584, 0.8642258, 0.08588241, 0.70640945, 0.19748867, + 0.6613063, 0.6449484, 0.768964, 0.9039073, 0.6277202, 0.77593136, 0.35429934, 0.8069173, + 0.3516526, 0.71314, 0.50186676, 0.8944276, 0.5470671, 0.45485002, 0.82426745, 0.2785842, + 0.9404638, 0.8959508, 0.15114321, 0.18969482, 0.78833485, 0.9598267, 0.29174066, 0.3494771, + 0.5854956, 0.0831098, 0.960891, 0.56964827, 0.829203, 0.7542679, 0.9568423, 0.9578806, + 0.88932663, 0.48814714, 0.39864913, 0.42221805, 0.3055165, 0.42976233, 0.19865331, 0.93883455, + 0.7655661, 0.5970062, 0.4758167, 0.15800795, 0.17757647, 0.15753652, 0.3730905, 0.47599813, + 0.27207386, 0.42162967, 0.08353208, 0.96827507, 0.9347392, 0.51671463, 0.40915382, 0.7014796, + 0.35320777, 0.4194869, 0.3184117, 0.5446104, 0.81504035, 0.78465104, 0.9777143, 0.5973847, + 0.7562977, 0.54398614, 0.0051009622, 0.05891997, 0.05620089, 0.4020494, 0.9730677, 0.5107014, + 0.69729745, 0.21230865, 0.4241287, 0.19132863, 0.48401004, 0.1337327, 0.17190064, 0.42795905, + 0.7100193, 0.48489287, 0.29757443, 0.40757337, 0.67073584, 0.98856723, 0.023141444, 0.37261203, + 0.07899332, 0.6971695, 0.06901029, 0.8860296, 0.11135061, 0.65404296, 0.12379419, 0.98091507, + 0.6192919, 0.878432, 0.40171024, 0.63359034, 0.15243557, 0.31417054, 0.41979724, 0.87002444, + 0.44856197, 0.5728306, 0.2709776, 0.7224305, 0.09258589, 0.21782517, 0.21746957, 0.21947508, + 0.24758625, 0.8904527, 0.8345911, 0.3301475, 0.48707664, 0.57014096, 0.92664886, 0.7677305, + 0.5208447, 0.6324889, 0.97992665, 0.35903138, 0.3330391, 0.0870381, 0.39935082, 0.043254532, + 0.08851445, 0.44321367, 0.57203674, 0.60557806, 0.73202246, 0.5383103, 0.27552348, 0.39584875, + 0.06509563, 0.42754996, 0.95901144, 0.09790518, 0.7175897, 0.3007109, 0.28002614, 0.86116815, + 0.47969994, 0.8495352, 0.63844335, 0.22089794, 0.8194518, 0.7936467, 0.4938384, 0.049150985, + 0.9517831, 0.6339798, 0.11274567, 0.51994663, 0.3342439, 0.060765848, 0.53698534, 0.36152387, + 0.17347981, 0.22772305, 0.6339161, 0.6493722, 0.64578843, 0.6118915, 0.48745263, 0.70927596, + 0.6149292, 0.43874234, 0.26505187, 0.05952667, 0.6111295, 0.8287437, 0.050140806, 0.22013378, + 0.35246277, 0.1187585, 0.87933147, 0.4835039, 0.44859475, 0.1784529, 0.2238027, 0.29486778, + 0.9493753, 0.52288574, 0.65379494, 0.09804267, 0.42556462, 0.75557685, 0.061604857, 0.0043297815, + 0.8905646, 0.59748757, 0.92442536, 0.4898666, 0.6667948, 0.6306539, 0.21537969, 0.8678084, + 0.3620826, 0.9291674, 0.6059688, 0.3807095, 0.5285948, 0.43431175, 0.43802148, 0.123039424, + 0.583839, 0.8926119, 0.16748385, 0.2154854, 0.18143441, 0.05348144, 0.9129291, 0.99502695, + 0.003920352, 0.33904833, 0.69999695, 0.12290272, 0.9580966, 0.38940993, 0.2837113, 0.85935235, + 0.37713748, 0.2607221, 0.16896206, 0.013641968, 0.90431833, 0.5602742, 0.553339, 0.72180885, + 0.9033788, 0.011523027, 0.1214213, 0.51942736, 0.57248414, 0.8430932, 0.76627296, 0.5150635, + 0.084864266, 0.5307555, 0.51420367, 0.5329527, 0.588093, 0.84611946, 0.82289535, 0.83708316, + 0.68455845, 0.9293985, 0.48594627, 0.32774645, 0.930657, 0.092476964, 0.9097118, 0.97267264, + 0.6454561, 0.74661636, 0.003572011, 0.2678727, 0.2653497, 0.4243795, 0.2187211, 0.023564778, + 0.3392729, 0.44567502, 0.31210658, 0.16991138, 0.9320601, 0.39350176, 0.42254278, 0.16082714, + 0.57277536, 0.18493341, 0.03803846, 0.4273411, 0.87520623, 0.7507586, 0.27125937, 0.531018, + 0.43782672, 0.33187887, 0.32908353, 0.97491986, 0.07432794, 0.22559255, 0.7911518, 0.8109018, + 0.10181122, 0.14874865, 0.8739713, 0.8258678, 0.83952117, 0.49840027, 0.24971384, 0.6604848, + 0.3120344, 0.4906389, 0.19367984, 0.14241797, 0.5340129, 0.65298396, 0.90502304, 0.2910567, + 0.50685567, 0.3251191, 0.7549711, 0.7457236, 0.054438505, 0.4823707, 0.09746641, 0.8946975, + 0.47535703, 0.472554, 0.83004594, 0.9334708, 0.09529597, 0.24380124, 0.9492368, 0.11368034, + 0.6545232, 0.5012047, 0.06810016, 0.7833115, 0.5195305, 0.59667504, 0.32130596, 0.07437508, + 0.9352196, 0.3775537, 0.11530671, 0.38456735, 0.5570788, 0.12884142, 0.9970051, 0.7848427, + 0.42685586, 0.03802683, 0.4680642, 0.7492088, 0.47062147, 0.045428254, 0.75646335, 0.6194405, + 0.05128224, 0.9792738, 0.35051075, 0.3669672, 0.66835433, 0.31624305, 0.56518877, 0.06823316, + 0.5414021, 0.0799995, 0.4878948, 0.032808155, 0.5848838, 0.12171154, 0.7715262, 0.9101807, + 0.0038131434, 0.680596, 0.810504, 0.67688483, 0.36706397, 0.7128991, 0.3376187, 0.3465156, + 0.47554886, 0.04520323, 0.5066149, 0.05726915, 0.77573705, 0.200028, 0.6430589, 0.6090949, + 0.7447414, 0.44865963, 0.73202926, 0.5402566, 0.24616429, 0.9543388, 0.40602076, 0.61897653, + 0.8123649, 0.047073558, 0.8431653, 0.47707924, 0.6409466, 0.964197, 0.1999589, 0.3051443, + 0.2665006, 0.5578835, 0.7453957, 0.7900255, 0.23492423, 0.07957853, 0.25237653, 0.33838317, + 0.6416551, 0.0039951354, 0.89141834, 0.62315106, 0.80962807, 0.50791967, 0.29249611, 0.34137407, + 0.4369406, 0.8787999, 0.28806677, 0.1362242, 0.3896823, 0.23126958, 0.66401637, 0.049474377, + 0.27457523, 0.19152752, 0.8645199, 0.31999043, 0.8697338, 0.8605395, 0.70556897, 0.5113519, + 0.84524435, 0.20147063, 0.79076856, 0.21785353, 0.4546323, 0.8530334, 0.3741707, 0.66516286, + 0.1962831, 0.3936461, 0.89860153, 0.24216916, 0.062920436, 0.7828697, 0.8093484, 0.30444527, + 0.75457746, 0.5017912, 0.040138636, 0.7621467, 0.6761302, 0.06373471, 0.915462, 0.035231, + 0.89386714, 0.6959213, 0.51545024, 0.04339671, 0.21505861, 0.9323861, 0.46864936, 0.7811156, + 0.29842615, 0.38006642, 0.7779068, 0.60815746, 0.7171511, 0.07464257, 0.88674176, 0.5839072, + 0.5046292, 0.6229039, 0.9399411, 0.9960362, 0.33266804, 0.42184722, 0.9865539, 0.49170554, + 0.38217908, 0.5600747, 0.565413, 0.36794263, 0.82040083, 0.94342226, 0.8352217, 0.78150964, + 0.2860086, 0.75553757, 0.32398638, 0.758711, 0.3375832, 0.33077398, 0.45010427, 0.26389697, + 0.92499673, 0.11748593, 0.943743, 0.682854, 0.004962936, 0.20119096, 0.58729416, 0.67993486, + 0.6150494, 0.45623145, 0.25751752, 0.053226303, 0.12379362, 0.91942585, 0.702563, 0.47201994, + 0.7093674, 0.023744669, 0.66121763, 0.65498394, 0.36697313, 0.10070673, 0.96071476, 0.3550039, + 0.54484475, 0.99639714, 0.32214886, 0.96161354, 0.7506562, 0.12803078, 0.24632397, 0.17385522, + 0.17279965, 0.6760441, 0.071039446, 0.2151821, 0.4781042, 0.30369994, 0.48674262, 0.18098812, + 0.97278047, 0.8854781, 0.7528932, 0.3641694, 0.68590474, 0.7819954, 0.657716, 0.36658275, + 0.05297459, 0.85196644, 0.049343612, 0.31383854, 0.6695563, 0.7951203, 0.89692384, 0.82429004, + 0.15677115, 0.5887391, 0.13800927, 0.0085657975, 0.8790421, 0.6256806, 0.9292787, 0.48701864, + 0.20990747, 0.083662316, 0.88042665, 0.4477495, 0.8483864, 0.48738086, 0.99391574, 0.40566745, + 0.537002, 0.4802295, 0.6822035, 0.48149505, 0.34781352, 0.5965454, 0.66909915, 0.76284933, + 0.33868113, 0.9555661, 0.90863895, 0.89868975, 0.07868716, 0.93248546, 0.50429887, 0.37767935, + 0.77912027, 0.24674945, 0.05841095, 0.8893651, 0.16569066, 0.4781768, 0.301946, 0.34709984, + 0.9561994, 0.26587456, 0.15426192, 0.6022424, 0.9015687, 0.20996648, 0.51819634, 0.5655937, + 0.8580507, 0.64367616, 0.7768365, 0.18932684, 0.11291685, 0.4154288, 0.4764765, 0.5602257, + 0.91964, 0.37515992, 0.6698847, 0.923476, 0.7170417, 0.030588947, 0.40833148, 0.27742204, + 0.57936347, 0.5027473, 0.6686292, 0.60163695, 0.42896992, 0.10455062, 0.2399768, 0.058825243, + 0.17828348, 0.3351036, 0.5252956, 0.08193896, 0.44228348, 0.06685673, 0.8612806, 0.12871465, + 0.43736976, 0.34304523, 0.040639006, 0.435011, 0.15564895, 0.314972, 0.2647625, 0.36369145, + 0.770273, 0.4981852, 0.96972513, 0.79053074, 0.80829215, 0.37847006, 0.63005817, 0.9256105, + 0.85754305, 0.8768399, 0.022878975, 0.3988214, 0.54133725, 0.9165594, 0.1366238, 0.7535001, + 0.40369937, 0.71801126, 0.011043364, 0.77781326, 0.89013314, 0.39453754, 0.11794228, 0.85278326, + 0.5138793, 0.54117, 0.4861062, 0.37399647, 0.98994994, 0.9733205, 0.12177309, 0.26439142, + 0.23798482, 0.30493778, 0.83136404, 0.9307847, 0.13482551, 0.44944605, 0.25053307, 0.7998134, + 0.70504546, 0.5996852, 0.22439589, 0.5654436, 0.043977752, 0.4624592, 0.5873774, 0.52081037, + 0.20642142, 0.2871389, 0.031311635, 0.43763772, 0.30392867, 0.48694924, 0.4735583, 0.37573543, + 0.3802429, 0.11694187, 0.27665144, 0.26712215, 0.89236385, 0.25606167, 0.93566054, 0.8842226, + 0.7550668, 0.7584876, 0.16083659, 0.23639946, 0.08519537, 0.20583908, 0.6186746, 0.9542533, + 0.46747816, 0.21122995, 0.07276781, 0.29044798, 0.17014165, 0.5524987, 0.8088055, 0.0514201, + 0.9537926, 0.9652958, 0.16757506, 0.70281106, 0.94200885, 0.6841354, 0.96046275, 0.7510356, + 0.8313795, 0.45562857, 0.5505418, 0.017883644, 0.17279461, 0.9834109, 0.90744954, 0.44898376, + 0.66402465, 0.34017327, 0.81037676, 0.28549019, 0.3016226, 0.35097796, 0.43561503, 0.00058234343, + 0.6684643, 0.07705832, 0.97015953, 0.092698716, 0.41418144, 0.18311031, 0.20559378, 0.82774425, + 0.30813637, 0.22523133, 0.31332958, 0.92706805, 0.08848662, 0.23284948, 0.9422138, 0.07093142, + 0.7980248, 0.409801, 0.40501997, 0.6295668, 0.6552973, 0.600791, 0.7814587, 0.48406723, + 0.3037804, 0.62378407, 0.62642336, 0.82996833, 0.7421219, 0.5233153, 0.74979746, 0.6028146, + 0.5296808, 0.16699271, 0.03434674, 0.86495054, 0.71397585, 0.86776406, 0.33685416, 0.6482692, + 0.2500348, 0.7227976, 0.70974725, 0.9475633, 0.6700813, 0.9803815, 0.36049715, 0.43117517, + 0.39795953, 0.7394454, 0.4874654, 0.8918216, 0.94595796, 0.8060482, 0.3452851, 0.06767335, + 0.29559964, 0.4860923, 0.7889183, 0.7903974, 0.556687, 0.3756254, 0.08562232, 0.7848211, + 0.47543386, 0.71051496, 0.3973873, 0.9214939, 0.19850273, 0.07726323, 0.3569556, 0.9302608, + 0.072946854, 0.7567508, 0.37953198, 0.9324997, 0.89104366, 0.8338954, 0.8139859, 0.32339892, + 0.2632869, 0.19524816, 0.43200883, 0.002676534, 0.035849903, 0.8579759, 0.65685666, 0.7236325, + 0.82170767, 0.9666734, 0.5693509, 0.22788355, 0.07884572, 0.54645675, 0.09158218, 0.8744094, + 0.63717526, 0.9249262, 0.47212943, 0.9595664, 0.58299416, 0.43900326, 0.23267244, 0.3206963, + 0.3824898, 0.55720466, 0.8188748, 0.18920717, 0.42651626, 0.41278538, 0.17662966, 0.46170422, + 0.6721064, 0.4655194, 0.5271105, 0.3614388, 0.94361657, 0.08294579, 0.74897116, 0.617458, + 0.053658314, 0.67375475, 0.09978627, 0.23182935, 0.50791234, 0.12907204, 0.85141504, 0.5264901, + 0.66516864, 0.50512254, 0.29532441, 0.9661175, 0.36176598, 0.8544195, 0.7404047, 0.82428366, + 0.96257573, 0.11131253, 0.62018675, 0.47864527, 0.039101128, 0.46764946, 0.29711628, 0.40892226, + 0.7900437, 0.10764668, 0.55577713, 0.6133263, 0.019346252, 0.73014337, 0.9307928, 0.5542295, + 0.17595504, 0.8546715, 0.90590805, 0.9092394, 0.33921698, 0.0008430821, 0.81278396, 0.25341776, + 0.7057896, 0.29238465, 0.52403855, 0.9213937, 0.11746097, 0.21051219, 0.09993823, 0.8176869, + 0.72511464, 0.70282686, 0.3988631, 0.83230406, 0.46275905, 0.2703259, 0.57835686, 0.58600885, + 0.3766385, 0.690864, 0.44178563, 0.40026566, 0.5732949, 0.23808873, 0.50714386, 0.9350253, + 0.57432973, 0.74109495, 0.79016244, 0.5070945, 0.9485114, 0.8311653, 0.48506665, 0.9617326, + 0.29852858, 0.366769, 0.77285564, 0.74671644, 0.94361097, 0.3757226, 0.29146126, 0.57953155, + 0.007708449, 0.7380902, 0.88821167, 0.31651938, 0.33128026, 0.09848877, 0.09147043, 0.90562916, + 0.27631462, 0.31989923, 0.53260094, 0.648353, 0.5590575, 0.4125183, 0.68012285, 0.4677009, + 0.7852408, 0.5890133, 0.34706393, 0.37636602, 0.42034975, 0.5928437, 0.86917543, 0.89394933, + 0.21776019, 0.43713045, 0.5337755, 0.09599007, 0.49747026, 0.83164036, 0.6423979, 0.00091591524, + 0.39940274, 0.8622541, 0.3925572, 0.83520466, 0.3498771, 0.19062445, 0.603745, 0.475841, + 0.6496245, 0.8845333, 0.2307799, 0.6286122, 0.29856437, 0.83671373, 0.40267518, 0.8860103, + 0.6866461, 0.30515477, 0.9614757, 0.3545977, 0.028658632, 0.9150952, 0.15918177, 0.41486475, + 0.8689148, 0.9942623, 0.0987592, 0.8941498, 0.5647133, 0.99548036, 0.40815887, 0.44467425, + 0.6775013, 0.531685, 0.24895021, 0.69680333, 0.019961093, 0.8449182, 0.1178238, 0.59461635, + 0.98526824, 0.871223, 0.7267415, 0.53581643, 0.3620638, 0.24056326, 0.59538496, 0.38104647, + 0.034455262, 0.6477652, 0.40934396, 0.19231549, 0.8701647, 0.28780022, 0.97225726, 0.48430753, + 0.7030723, 0.9776925, 0.9662899, 0.3556148, 0.09186526, 0.7095952, 0.9111277, 0.65414417, + 0.47637445, 0.78610563, 0.9511109, 0.7668794, 0.5877635, 0.7058718, 0.8660492, 0.8417279, + 0.18733096, 0.3668593, 0.36932942, 0.15743567, 0.18835372, 0.62336534, 0.05280094, 0.6283515, + 0.3988773, 0.7177127, 0.85969454, 0.9169481, 0.5861364, 0.21584338, 0.5745095, 0.3897011, + 0.55942774, 0.7646427, 0.993731, 0.042268623, 0.8786283, 0.762209, 0.5027511, 0.27567303, + 0.9600953, 0.072597355, 0.059442017, 0.57595813, 0.2894524, 0.82850564, 0.793283, 0.32858342, + 0.78171605, 0.56761605, 0.0049845274, 0.50330544, 0.9184708, 0.8148216, 0.29595378, 0.07970701, + 0.92489153, 0.33793837, 0.9567375, 0.37415254, 0.84990066, 0.9941796, 0.06800775, 0.26053104, + 0.21159613, 0.5614098, 0.20745164, 0.8231208, 0.7121408, 0.82378054, 0.9630996, 0.42512196, + 0.8641082, 0.09365638, 0.19734041, 0.11575636, 0.5639233, 0.4768428, 0.33889914, 0.5703717, + 0.9244297, 0.5311111, 0.13523202, 0.01852037, 0.21085885, 0.071204096, 0.4712303, 0.74460614, + 0.4686889, 0.914024, 0.117377095, 0.54068995, 0.80547154, 0.12859856, 0.4257724, 0.9659156, + 0.0045896024, 0.798911, 0.36436203, 0.7280426, 0.621054, 0.9701622, 0.6164426, 0.9579355, + 0.6045164, 0.5798626, 0.63919723, 0.82481444, 0.61748123, 0.18019743, 0.5157837, 0.44804874, + 0.99903923, 0.3863658, 0.44972283, 0.31878954, 0.85894763, 0.049487386, 0.04967219, 0.14039204, + 0.09017946, 0.4628455, 0.3544319, 0.7981168, 0.70640343, 0.42240968, 0.6196504, 0.73550963, + 0.667884, 0.23142478, 0.11116676, 0.7650123, 0.112480775, 0.6108565, 0.9493177, 0.9542675, + 0.9146685, 0.17729652, 0.41400397, 0.6309963, 0.43200687, 0.6464159, 0.12712492, 0.2884915, + 0.3982403, 0.66932833, 0.54165065, 0.4191057, 0.67887574, 0.10698286, 0.10696802, 0.9551022, + 0.7492388, 0.22396998, 0.63786316, 0.15820846, 0.6157303, 0.8183258, 0.25153205, 0.18210672, + 0.9602121, 0.9036876, 0.15693043, 0.38605642, 0.06903067, 0.7507714, 0.33556795, 0.38818276, + 0.43704808, 0.4954553, 0.40412104, 0.6816511, 0.63548344, 0.4186759, 0.70838517, 0.44376358, + 0.3357206, 0.06594042, 0.39987648, 0.037075095, 0.88075906, 0.20054473, 0.05663389, 0.5609011, + 0.124456756, 0.15606454, 0.015773552, 0.88851076, 0.9729933, 0.79110926, 0.33853722, 0.09634267, + 0.9257645, 0.23189723, 0.6707842, 0.52831924, 0.48948547, 0.7410685, 0.2194608, 0.6474689, + 0.3337604, 0.15346791, 0.98205763, 0.18342042, 0.70286185, 0.42531693, 0.3196188, 0.3305629, + 0.5155848, 0.19409959, 0.82248783, 0.5497899, 0.41844934, 0.21445695, 0.3013477, 0.7596674, + 0.8470537, 0.5960293, 0.26159966, 0.91296613, 0.7349978, 0.44705716, 0.41518942, 0.6459388, + 0.1569181, 0.30777836, 0.7558866, 0.4035862, 0.7478917, 0.18006596, 0.9542781, 0.5946521, + 0.8464796, 0.75240755, 0.7033147, 0.7272911, 0.2184871, 0.87321347, 0.8580393, 0.69913983, + 0.83644575, 0.68521065, 0.372926, 0.77889377, 0.96862143, 0.7887473, 0.67789334, 0.7113075, + 0.93054956, 0.9111168, 0.6812655, 0.89345616, 0.47946882, 0.30649468, 0.9124711, 0.88670325, + 0.7382785, 0.33611885, 0.026502334, 0.39508346, 0.6694303, 0.9160326, 0.5826711, 0.33551884, + 0.23982148, 0.22783574, 0.70331025, 0.6660418, 0.51114225, 0.57405657, 0.5411803, 0.9738403, + 0.73799, 0.5624598, 0.07652036, 0.04978715, 0.07413118, 0.6362957, 0.6773174, 0.36817077, + 0.629885, 0.044579085, 0.47303665, 0.836775, 0.49880046, 0.06082195, 0.115183294, 0.53998494, + 0.83993644, 0.81661147, 0.98901266, 0.88236827, 0.84671116, 0.46295583, 0.029709496, 0.9204132, + 0.10253954, 0.03740714, 0.5390723, 0.74078566, 0.08543706, 0.011851499, 0.20016527, 0.356493, + 0.36993647, 0.70742524, 0.15546617, 0.917009, 0.22997431, 0.86268395, 0.81257206, 0.1019828, + 0.65880144, 0.6583316, 0.7651984, 0.6248512, 0.44299594, 0.74589616, 0.8367184, 0.17899951, + 0.11265245, 0.16332534, 0.8261054, 0.6945308, 0.5850439, 0.65881205, 0.12712914, 0.27503416, + 0.53275037, 0.15610719, 0.9472476, 0.036724042, 0.0972234, 0.9365317, 0.2827337, 0.6180335, + 0.8444138, 0.116543666, 0.46683854, 0.7913752, 0.9053558, 0.19817433, 0.3100106, 0.9772525, + 0.0040394296, 0.8870298, 0.22356682, 0.18837956, 0.6977574, 0.40485826, 0.47741726, 0.35664338, + 0.20068875, 0.36007276, 0.62813324, 0.92211175, 0.1857461, 0.5056345, 0.7714491, 0.7111244, + 0.5802961, 0.880432, 0.3842586, 0.07386713, 0.9154364, 0.775848, 0.0047594067, 0.7222697, + 0.37559786, 0.14716488, 0.7804374, 0.32645226, 0.27905762, 0.04534316, 0.27364373, 0.9144781, + 0.8533147, 0.84885293, 0.6904914, 0.6980141, 0.43524522, 0.93874955, 0.57727677, 0.1278921, + 0.67868996, 0.5906042, 0.8360353, 0.73715067, 0.30839851, 0.360622, 0.43228745, 0.33877933, + 0.3450946, 0.7557141, 0.21107915, 0.024923787, 0.8139157, 0.23614348, 0.061816096, 0.22819144, + 0.88227046, 0.5012971, 0.8127817, 0.55059254, 0.6244208, 0.15096499, 0.07758577, 0.15534559, + 0.08642902, 0.7136551, 0.068797, 0.33689317, 0.8151431, 0.073435, 0.27587917, 0.6415465, + 0.30315524, 0.25636652, 0.3951772, 0.32483214, 0.9398127, 0.26760876, 0.41387123, 0.014975904, + 0.7148774, 0.4416581, 0.9813577, 0.5233435, 0.83426404, 0.24871995, 0.100562416, 0.6171712, + 0.78703684, 0.4622999, 0.8157436, 0.93394816, 0.1259679, 0.026684225, 0.50347126, 0.527725, + 0.5130184, 0.6806897, 0.6507216, 0.59474343, 0.29182497, 0.09539426, 0.52363616, 0.27165958, + 0.47983494, 0.56953263, 0.72176856, 0.5575492, 0.8409663, 0.73698395, 0.28837872, 0.6146617, + 0.08742587, 0.7978058, 0.8357151, 0.18276273, 0.16960731, 0.55424225, 0.32108158, 0.83770907, + 0.61309266, 0.45162576, 0.54985636, 0.35284323, 0.25769138, 0.34193105, 0.5155786, 0.27647102, + 0.75289524, 0.86745226, 0.8118137, 0.259123, 0.61688715, 0.8191278, 0.7231509, 0.6194832, + 0.9180219, 0.7096981, 0.043508567, 0.26473138, 0.5269514, 0.5430132, 0.77620494, 0.05005288, + 0.1739212, 0.20108196, 0.8465223, 0.32816213, 0.19096912, 0.32070854, 0.35811764, 0.9587762, + 0.3596081, 0.81301254, 0.9816507, 0.84019923, 0.54553795, 0.17079297, 0.013968218, 0.13790388, + 0.053954035, 0.44529754, 0.80465394, 0.9735141, 0.92517024, 0.029255724, 0.99777454, 0.26829806, + 0.07465485, 0.21623193, 0.2647408, 0.45990923, 0.5107337, 0.056350194, 0.31075767, 0.07007945, + 0.6754208, 0.49980345, 0.17892201, 0.056609415, 0.4954088, 0.18741646, 0.08550189, 0.4321867, + 0.5093346, 0.85303754, 0.89951485, 0.8038746, 0.8374771, 0.88295174, 0.073945254, 0.7472289, + 0.69572985, 0.90560466, 0.21077734, 0.08165387, 0.7383593, 0.80269086, 0.12488264, 0.14466548, + 0.20330743, 0.5782242, 0.2535073, 0.9747372, 0.055967752, 0.8982084, 0.44804245, 0.30325794, + 0.50225484, 0.91157126, 0.16477837, 0.045734458, 0.99187094, 0.9573588, 0.6424951, 0.8665376, + 0.35979563, 0.37246728, 0.46417946, 0.0721327, 0.12974085, 0.19389993, 0.430821, 0.19170313, + 0.14228667, 0.51751184, 0.76417935, 0.605129, 0.8455728, 0.2291038, 0.3317202, 0.87272996, + 0.37492082, 0.034256544, 0.853302, 0.9171846, 0.9339092, 0.11076469, 0.37621894, 0.6111262, + 0.40499508, 0.5962569, 0.30161974, 0.92590576, 0.7181733, 0.028210793, 0.755358, 0.7383711, + 0.2631096, 0.34423977, 0.7218582, 0.365892, 0.3385114, 0.05274994, 0.014924624, 0.0094075035, + 0.1474032, 0.061804168, 0.8324505, 0.5384559, 0.13402902, 0.84291345, 0.45768508, 0.27315107, + 0.5798511, 0.29204842, 0.6708136, 0.9576144, 0.10405682, 0.7253105, 0.9326284, 0.24903095, + 0.99624836, 0.8530533, 0.6671376, 0.5334839, 0.8922802, 0.50491524, 0.47352976, 0.114075884, + 0.76215386, 0.025808325, 0.34201944, 0.50133306, 0.5072456, 0.9658282, 0.53421855, 0.32217088, + 0.019331919, 0.8438945, 0.7697814, 0.872105, 0.27831417, 0.837763, 0.47709718, 0.56208163, + 0.13857186, 0.028468672, 0.34605467, 0.42612493, 0.35739717, 0.79774356, 0.63431424, 0.5377991, + 0.4116114, 0.4728273, 0.36964366, 0.48545814, 0.3856123, 0.48144072, 0.11712731, 0.64248794, + 0.5882744, 0.71837467, 0.77630204, 0.1082207, 0.500894, 0.956352, 0.7659055, 0.6140229, + 0.75782984, 0.34864277, 0.9382825, 0.26016235, 0.9555291, 0.06052337, 0.9707168, 0.15848531, + 0.3759561, 0.10505597, 0.39491206, 0.86381155, 0.15886053, 0.047404833, 0.7566787, 0.96441025, + 0.3914941, 0.8042203, 0.08972167, 0.0344183, 0.59618455, 0.0487604, 0.93655854, 0.5378912, + 0.7267672, 0.12729345, 0.2838306, 0.5599395, 0.06146098, 0.3688765, 0.061187647, 0.18221985, + 0.2625632, 0.7320318, 0.6682951, 0.008754399, 0.85946107, 0.3741519, 0.58227, 0.35108802, + 0.5021105, 0.21115834, 0.10950206, 0.28055635, 0.08652866, 0.25331578, 0.48362744, 0.5408696, + 0.9616959, 0.8118918, 0.7167266, 0.6966737, 0.8666303, 0.73148715, 0.017838325, 0.7090695, + 0.4120842, 0.40039128, 0.5333952, 0.8282356, 0.77669275, 0.41077727, 0.09702433, 0.007079605, + 0.043868326, 0.21269222, 0.6012483, 0.42682874, 0.37910977, 0.7479243, 0.10494917, 0.01734221, + 0.22195028, 0.73863363, 0.5323078, 0.38502622, 0.93925834, 0.6560022, 0.45136255, 0.47345138, + 0.643666, 0.74296105, 0.5982436, 0.24956919, 0.65214986, 0.36451396, 0.31558952, 0.531076, + 0.71419346, 0.9592256, 0.5966702, 0.45906982, 0.8407567, 0.7540344, 0.5743953, 0.09133322, + 0.114134, 0.10242245, 0.23668802, 0.87383646, 0.6520674, 0.056798704, 0.16175981, 0.2137716, + 0.7069426, 0.6993844, 0.4747234, 0.1279967, 0.19917937, 0.6328121, 0.76981115, 0.756082, + 0.94902873, 0.059943788, 0.1845696, 0.03373171, 0.8125337, 0.84745514, 0.35492972, 0.67935437, + 0.8971027, 0.07017233, 0.7126353, 0.41988418, 0.15125412, 0.6458793, 0.1765855, 0.46791586, + 0.16423836, 0.4409746, 0.27089223, 0.83683586, 0.4193142, 0.5775261, 0.82138395, 0.58686733, + 0.58120126, 0.384472, 0.54262656, 0.95276546, 0.8897906, 0.1875928, 0.33189663, 0.08138137, + 0.18941447, 0.8405882, 0.51004106, 0.7808129, 0.5694648, 0.54066354, 0.27879953, 0.26667887, + 0.74749273, 0.55733365, 0.97673374, 0.5818951, 0.34416345, 0.74187565, 0.06251747, 0.061063267, + 0.5227989, 0.0068075284, 0.96375835, 0.75820476, 0.36191988, 0.93297523, 0.3367678, 0.37150264, + 0.23855984, 0.5977023, 0.45253047, 0.42806166, 0.30482855, 0.40216422, 0.7895638, 0.7095099, + 0.7382757, 0.6312539, 0.23046969, 0.3106659, 0.13583827, 0.39577258, 0.89845103, 0.6235748, + 0.16217506, 0.004213362, 0.08934315, 0.86198056, 0.60079235, 0.23948883, 0.24270387, 0.8393256, + 0.32195452, 0.4815633, 0.4299666, 0.8829831, 0.22383447, 0.57369184, 0.7194615, 0.2564392, + 0.5038204, 0.13853844, 0.5422531, 0.97176254, 0.0881331, 0.85073787, 0.9618503, 0.3453285, + 0.76776993, 0.26722383, 0.8436194, 0.7129096, 0.51140594, 0.75185156, 0.925225, 0.1270263, + 0.10835649, 0.34018353, 0.5960297, 0.35770652, 0.8436321, 0.47478724, 0.7707103, 0.999071, + 0.35499844, 0.6132049, 0.106107146, 0.82326525, 0.97219765, 0.9065807, 0.48567542, 0.16458383, + 0.9117924, 0.9740305, 0.8068454, 0.99729985, 0.8535195, 0.9266885, 0.5354417, 0.3114372, + 0.04236306, 0.7440147, 0.09421062, 0.3335685, 0.3958694, 0.52979434, 0.32791966, 0.57010293, + 0.5563383, 0.30294028, 0.77462655, 0.88365096, 0.97766215, 0.36175498, 0.41280714, 0.029033197, + 0.36782816, 0.5431821, 0.61676407, 0.47492823, 0.7446307, 0.13858505, 0.37313086, 0.86118925, + 0.7815484, 0.6790356, 0.8011172, 0.53737545, 0.94500613, 0.92792517, 0.27350682, 0.18166798, + 0.8047418, 0.2845925, 0.31534344, 0.09961744, 0.38057664, 0.43714178, 0.6032016, 0.82520413, + 0.28528523, 0.5360042, 0.26692694, 0.66925734, 0.13195412, 0.6020245, 0.18692169, 0.5500374, + 0.5612233, 0.77781224, 0.62947166, 0.31033742, 0.30992442, 0.060513485, 0.5668065, 0.903778, + 0.3708838, 0.2330214, 0.55202013, 0.71683383, 0.72867715, 0.79054415, 0.6250968, 0.62841314, + 0.029433481, 0.59295857, 0.07890911, 0.69306964, 0.046411548, 0.3131897, 0.6484566, 0.9306864, + 0.93998045, 0.79156, 0.189643, 0.20862652, 0.8716581, 0.7038735, 0.7292351, 0.1795239, + 0.49211392, 0.25107977, 0.9761521, 0.16719387, 0.29845348, 0.9631694, 0.87174356, 0.74422836, + 0.7177861, 0.41156542, 0.72873366, 0.14755523, 0.88512164, 0.8863678, 0.096526965, 0.49474105, + 0.9109074, 0.6385138, 0.63982385, 0.53899556, 0.5231154, 0.49385205, 0.5036258, 0.24803366, + 0.12935568, 0.6987853, 0.37035698, 0.5183644, 0.8708705, 0.35817996, 0.032119915, 0.66701025, + 0.5037863, 0.37249622, 0.22471993, 0.47759736, 0.81439203, 0.45790294, 0.32995966, 0.06626411, + 0.721215, 0.33468077, 0.97528356, 0.6348461, 0.584456, 0.50090134, 0.04556473, 0.053612676, + 0.695033, 0.69490194, 0.29771915, 0.23314431, 0.064049676, 0.19023955, 0.6564085, 0.99826187, + 0.7474539, 0.7281185, 0.037838195, 0.5996682, 0.5928124, 0.35337916, 0.87335783, 0.3596061, + 0.37944552, 0.06172341, 0.6437689, 0.51262546, 0.66164786, 0.6189296, 0.680349, 0.45300442, + 0.3085541, 0.57355976, 0.81778055, 0.18843463, 0.51856846, 0.8687797, 0.6635776, 0.6284543, + 0.6532206, 0.3167443, 0.8233314, 0.17596854, 0.06046078, 0.7989756, 0.6029606, 0.31354675, + 0.7160877, 0.22645807, 0.7301434, 0.086273566, 0.42006475, 0.7302915, 0.4734517, 0.36783585, + 0.4613229, 0.6156775, 0.2554006, 0.5227326, 0.8571324, 0.53293926, 0.39196482, 0.07610343, + 0.014552955, 0.84471476, 0.9245902, 0.49048993, 0.37245902, 0.4679739, 0.47969338, 0.8786742, + 0.06454086, 0.40938383, 0.9464476, 0.2760681, 0.5300478, 0.6973893, 0.2991453, 0.5804699, + 0.45876285, 0.33022216, 0.79653776, 0.43518978, 0.8887862, 0.59407544, 0.032939672, 0.5782626, + 0.10010804, 0.44994467, 0.7271117, 0.902891, 0.6133791, 0.140845, 0.77132195, 0.12028129, + 0.9247795, 0.74722797, 0.16141559, 0.21574605, 0.8743854, 0.11247064, 0.9410877, 0.24811381, + 0.74676466, 0.8514692, 0.021732707, 0.010680916, 0.7838439, 0.19738361, 0.8377881, 0.7639336, + 0.31653216, 0.6749307, 0.06396978, 0.52691025, 0.7364015, 0.956775, 0.18731725, 0.42047754, + 0.8117751, 0.34632754, 0.39038187, 0.9225143, 0.7408622, 0.57680243, 0.2652951, 0.92369586, + 0.6380619, 0.82616633, 0.35128862, 0.7828198, 0.5359737, 0.08339928, 0.7060845, 0.3462922, + 0.38913444, 0.54842395, 0.6884251, 0.037316978, 0.5723427, 0.022258755, 0.79441875, 0.90272444, + 0.61215657, 0.9631781, 0.5863588, 0.9384484, 0.07687521, 0.24441172, 0.38387978, 0.96800447, + 0.5599107, 0.74093807, 0.403971, 0.5280579, 0.72208875, 0.018573398, 0.5072516, 0.16996226, + 0.58617413, 0.09803684, 0.37261903, 0.95767754, 0.84609497, 0.05496832, 0.22795987, 0.23313288, + 0.9688462, 0.7176776, 0.1377758, 0.18797757, 0.26834992, 0.15000027, 0.8481348, 0.7895163, + 0.5519088, 0.48765746, 0.31035778, 0.77768403, 0.9904436, 0.32684666, 0.84682065, 0.39365014, + 0.44228655, 0.38328415, 0.22290905, 0.79503566, 0.6794283, 0.17802662, 0.62420344, 0.37056103, + 0.041172326, 0.51846284, 0.45114288, 0.47430587, 0.6496397, 0.8367412, 0.05662944, 0.5571883, + 0.7352182, 0.35322595, 0.9696022, 0.35919765, 0.10663593, 0.19590221, 0.6996546, 0.40991047, + 0.89280325, 0.6144547, 0.9761491, 0.23443131, 0.70821565, 0.7295676, 0.17951865, 0.25932744, + 0.25121617, 0.97896886, 0.515391, 0.46281084, 0.83205926, 0.4329242, 0.55370456, 0.7908196, + 0.093474135, 0.7672148, 0.14680524, 0.74988705, 0.69885737, 0.37382892, 0.13987659, 0.7151676, + 0.431028, 0.75316954, 0.04246583, 0.63721764, 0.35724443, 0.48762304, 0.28701422, 0.24638435, + 0.6836296, 0.8129986, 0.9022324, 0.064973645, 0.20187753, 0.38977212, 0.6623454, 0.31160477, + 0.3389442, 0.19181544, 0.2230897, 0.6706708, 0.32135025, 0.5938186, 0.725129, 0.30229402, + 0.7995213, 0.17878264, 0.2657235, 0.33942115, 0.04909697, 0.94976753, 0.7110531, 0.5189743, + 0.47457805, 0.2609815, 0.8034033, 0.9550461, 0.6871017, 0.542301, 0.90208304, 0.76359314, + 0.6919547, 0.2690066, 0.77918124, 0.019060668, 0.5306918, 0.48873094, 0.58894205, 0.703702, + 0.104869366, 0.8352005, 0.41094282, 0.507042, 0.15073924, 0.46920577, 0.3938173, 0.8372094, + 0.028040525, 0.7401718, 0.8376963, 0.17846179, 0.22189952, 0.9475931, 0.19728738, 0.7338621, + 0.101945534, 0.3832581, 0.59039557, 0.94089603, 0.5863688, 0.7072993, 0.624503, 0.7966432, + 0.28973243, 0.45949653, 0.9787162, 0.052343633, 0.81463736, 0.70606834, 0.7716022, 0.31079042, + 0.5898406, 0.5620215, 0.23455179, 0.21389648, 0.5388247, 0.2040111, 0.36823508, 0.0053723096, + 0.8671642, 0.9661939, 0.9270056, 0.94692993, 0.7046047, 0.72362125, 0.5416936, 0.7443616, + 0.07171923, 0.04531915, 0.91711515, 0.1474337, 0.89833534, 0.648046, 0.11733318, 0.39757007, + 0.21069747, 0.6142996, 0.21730955, 0.6912427, 0.49048957, 0.34147367, 0.022572042, 0.3219722, + 0.9685696, 0.5269059, 0.5886212, 0.659878, 0.7130413, 0.98339087, 0.19503741, 0.89793444, + 0.015023004, 0.5850233, 0.07373183, 0.62017494, 0.7802937, 0.6775731, 0.09203854, 0.5661112, + 0.9178029, 0.2343546, 0.9806244, 0.7693182, 0.7889532, 0.6241685, 0.41245508, 0.9417946, + 0.44468832, 0.8369817, 0.0031990237, 0.9245251, 0.98670155, 0.6769924, 0.51488274, 0.5256905, + 0.9436219, 0.6050334, 0.97836035, 0.17769879, 0.13500004, 0.8818156, 0.0313203, 0.08832834, + 0.8502817, 0.019180698, 0.13241069, 0.31331208, 0.5743142, 0.49715826, 0.6172764, 0.5331244, + 0.5222611, 0.6511984, 0.7734398, 0.256135, 0.3608493, 0.25325385, 0.533019, 0.34440103, + 0.114450805, 0.6468266, 0.2151897, 0.8760596, 0.9801919, 0.27051234, 0.9112329, 0.3380306, + 0.07014053, 0.54804134, 0.6765531, 0.1752603, 0.69921273, 0.9143398, 0.43111116, 0.035987273, + 0.2030343, 0.8922961, 0.91903645, 0.76977247, 0.49175784, 0.099143006, 0.3674804, 0.94753003, + 0.21970531, 0.47007462, 0.40226397, 0.3355032, 0.9035526, 0.25874776, 0.16484123, 0.69036806, + 0.07201438, 0.63395935, 0.063247986, 0.48817343, 0.6666259, 0.15526073, 0.10813647, 0.5797694, + 0.10794782, 0.79438007, 0.24317154, 0.026272861, 0.8206052, 0.4420161, 0.8339117, 0.6079213, + 0.22008722, 0.73745257, 0.053100668, 0.46855322, 0.33421737, 0.76324654, 0.8526432, 0.015307797, + 0.27934623, 0.26765963, 0.65635425, 0.51011723, 0.86824834, 0.57572967, 0.43447804, 0.8113928, + 0.38320008, 0.986185, 0.10324592, 0.06525337, 0.85109174, 0.94293773, 0.36936134, 0.047773577, + 0.7841596, 0.33926708, 0.66182464, 0.69737774, 0.85597146, 0.34120753, 0.12692484, 0.7776892, + 0.63616294, 0.79434264, 0.11541597, 0.16610004, 0.2056471, 0.696288, 0.35615066, 0.30876786, + 0.78131616, 0.04794019, 0.2088272, 0.39896628, 0.49890646, 0.59801924, 0.711521, 0.5322181, + 0.35990205, 0.43177876, 0.6430728, 0.8344202, 0.33877015, 0.76865834, 0.75682956, 0.2771495, + 0.3680912, 0.005327093, 0.68439364, 0.9949503, 0.10142185, 0.15526544, 0.15933633, 0.9381387, + 0.14073479, 0.87866503, 0.8739543, 0.07390571, 0.46031374, 0.268378, 0.6057457, 0.68691206, + 0.6300343, 0.79447806, 0.28393722, 0.80315155, 0.73411053, 0.9703951, 0.5488671, 0.18614037, + 0.6277461, 0.12960654, 0.33747572, 0.4241927, 0.6981348, 0.29250467, 0.43891907, 0.8675046, + 0.037513115, 0.8382665, 0.79800886, 0.20032, 0.011894401, 0.3612004, 0.207346, 0.6260507, + 0.88860387, 0.27068847, 0.25823146, 0.62024146, 0.72406495, 0.6376153, 0.0719044, 0.09152406, + 0.82603306, 0.9561607, 0.20438583, 0.5442921, 0.4847211, 0.95367795, 0.54303896, 0.3976961, + 0.45646, 0.49825326, 0.3672042, 0.9718153, 0.81778973, 0.73514366, 0.24000394, 0.8482301, + 0.43974596, 0.006449677, 0.036392592, 0.62204725, 0.47036913, 0.4054257, 0.67501765, 0.26883397, + 0.58713204, 0.6578865, 0.91454774, 0.46342203, 0.7121636, 0.92862564, 0.46207544, 0.9901308, + 0.057702154, 0.24595165, 0.5981596, 0.74197406, 0.08811883, 0.894627, 0.38278353, 0.08383514, + 0.2952275, 0.40031275, 0.74386, 0.5136412, 0.9939962, 0.2355307, 0.808261, 0.15346022, + 0.030684536, 0.41000134, 0.1804955, 0.71761525, 0.6012227, 0.44985715, 0.6211549, 0.4206074, + 0.28114304, 0.9355519, 0.95716006, 0.82683456, 0.03913026, 0.07961693, 0.6855325, 0.52783436, + 0.036177807, 0.3770734, 0.91411316, 0.5718381, 0.13698402, 0.4980299, 0.76011133, 0.545119, + 0.62366617, 0.95255744, 0.32681978, 0.07005637, 0.66156566, 0.16137652, 0.27483776, 0.35160136, + 0.8496255, 0.7610875, 0.4327375, 0.30216226, 0.74813014, 0.74446017, 0.38890806, 0.607845, + 0.62479675, 0.17755221, 0.46083102, 0.15256695, 0.9374669, 0.5559489, 0.04470488, 0.21561056, + 0.7147803, 0.21602567, 0.47746333, 0.6169228, 0.32141757, 0.23642296, 0.016476203, 0.53265464, + 0.64989, 0.6353765, 0.0939491, 0.64866525, 0.12303737, 0.5510985, 0.7590417, 0.11976651, + 0.6607141, 0.6055587, 0.9772091, 0.27804276, 0.64687943, 0.38337022, 0.7797042, 0.29171762, + 0.9881654, 0.30626813, 0.94704133, 0.9594318, 0.037198868, 0.60754436, 0.60765207, 0.06771721, + 0.9078526, 0.1112092, 0.3552761, 0.44554, 0.6839132, 0.657915, 0.030183792, 0.6132026, + 0.74461126, 0.9000829, 0.6522722, 0.112753615, 0.6505111, 0.74024284, 0.48480767, 0.073698185, + 0.4185105, 0.3410645, 0.49185285, 0.33190826, 0.5787399, 0.7666621, 0.5687311, 0.33141005, + 0.43632144, 0.18574573, 0.6287574, 0.01514944, 0.28938162, 0.057044394, 0.49545577, 0.042345677, + 0.027724478, 0.026231889, 0.74081266, 0.011828165, 0.19582245, 0.31350172, 0.43585333, 0.0027991086, + 0.5753749, 0.36400652, 0.5334315, 0.74679655, 0.731098, 0.6669506, 0.6412065, 0.24792254, + 0.8214605, 0.8733431, 0.54092133, 0.6961343, 0.115691505, 0.27574378, 0.48897734, 0.14119047, + 0.5424781, 0.02386607, 0.009218562, 0.49816743, 0.029157575, 0.015034353, 0.32382092, 0.6875669, + 0.40462708, 0.6099266, 0.08502913, 0.6242792, 0.9994301, 0.4729795, 0.87787575, 0.10500878, + 0.90521115, 0.48905376, 0.7565334, 0.21473333, 0.23323065, 0.8219346, 0.60031205, 0.76937085, + 0.5445392, 0.38083488, 0.19368897, 0.41603848, 0.51612306, 0.7993214, 0.92665416, 0.75198066, + 0.5372545, 0.5996222, 0.4693501, 0.17195638, 0.30428314, 0.9376859, 0.9736415, 0.5603405, + 0.040185597, 0.8458646, 0.34216946, 0.12117143, 0.58192146, 0.016927328, 0.24849239, 0.34848097, + 0.99546736, 0.43591255, 0.7909232, 0.62663776, 0.51921046, 0.274244, 0.9079598, 0.72054344, + 0.42355403, 0.2398477, 0.95362824, 0.6483227, 0.8213454, 0.90778244, 0.17144382, 0.6053057, + 0.68327236, 0.33304846, 0.08702466, 0.39980793, 0.0036293846, 0.7059194, 0.80072564, 0.96752524, + 0.5154122, 0.19619283, 0.17454775, 0.38736606, 0.47976512, 0.4791406, 0.1874494, 0.52761185, + 0.13234249, 0.845208, 0.4205711, 0.08021053, 0.00839825, 0.3000164, 0.23277025, 0.26301053, + 0.6916624, 0.74880666, 0.74840236, 0.064435445, 0.98405766, 0.32531884, 0.73899513, 0.13240317, + 0.6744208, 0.7368638, 0.43789902, 0.24887301, 0.9299027, 0.8486845, 0.34485158, 0.289548, + 0.6351869, 0.82339793, 0.11122555, 0.3230176, 0.09969627, 0.52059376, 0.24077836, 0.9444134, + 0.05239831, 0.42601636, 0.5159802, 0.9761374, 0.48721132, 0.09123329, 0.59690744, 0.383256, + 0.1002782, 0.8240141, 0.70814556, 0.25482276, 0.957517, 0.7362902, 0.9834676, 0.19009337, + 0.45719767, 0.042144574, 0.71294534, 0.7429013, 0.041241586, 0.9385764, 0.59770924, 0.28365803, + 0.50035644, 0.13102308, 0.44502363, 0.18500035, 0.18879086, 0.90975267, 0.16331425, 0.17106864, + 0.50802827, 0.80398893, 0.012037134, 0.55804133, 0.8093386, 0.7628578, 0.64519185, 0.58318746, + 0.1399564, 0.05464305, 0.14859481, 0.10588853, 0.14053893, 0.09002884, 0.332031, 0.89889675, + 0.8399303, 0.9211322, 0.86581993, 0.057551697, 0.8076484, 0.49787706, 0.90317184, 0.113821924, + 0.82830715, 0.23232217, 0.47578096, 0.35618824, 0.64620966, 0.41190708, 0.19446513, 0.19052555, + 0.6606999, 0.5370769, 0.74679446, 0.15352806, 0.72425306, 0.42542627, 0.3807547, 0.6943399, + 0.39695272, 0.12975785, 0.6029449, 0.98659855, 0.78998154, 0.4918207, 0.1431191, 0.41032755, + 0.7989921, 0.5461269, 0.34507003, 0.26765865, 0.043932725, 0.105762556, 0.36342022, 0.010151213, + 0.90081716, 0.89821523, 0.7297342, 0.5770165, 0.2870768, 0.28900358, 0.9369778, 0.72804934, + 0.86017793, 0.95806926, 0.44518864, 0.60346204, 0.34323436, 0.17850293, 0.17464367, 0.41450405, + 0.5403775, 0.17148003, 0.660599, 0.6778906, 0.89493215, 0.9165733, 0.32384035, 0.33648646, + 0.08920308, 0.06545341, 0.5571962, 0.10008278, 0.06683705, 0.92680645, 0.14659283, 0.5549373, + 0.17365667, 0.73664325, 0.25271094, 0.8260378, 0.69569206, 0.80373824, 0.4072631, 0.10794914, + 0.19278006, 0.8748956, 0.12642062, 0.8319123, 0.04663203, 0.53965706, 0.06709321, 0.6204891, + 0.37148324, 0.93056595, 0.7272812, 0.8724527, 0.44516358, 0.68552965, 0.11521906, 0.98424387, + 0.57437485, 0.39324772, 0.48781338, 0.22162339, 0.7318074, 0.836895, 0.66121227, 0.9333714, + 0.81147647, 0.89025134, 0.42980537, 0.6065911, 0.925792, 0.3486058, 0.718812, 0.7366392, + 0.7642169, 0.55264986, 0.4851105, 0.02003657, 0.79015267, 0.49192804, 0.28985444, 0.54954606, + 0.9983602, 0.936707, 0.72859955, 0.13627109, 0.1995253, 0.27414012, 0.10977373, 0.48812705, + 0.6214242, 0.26846707, 0.251663, 0.30244434, 0.31592485, 0.18563971, 0.3761417, 0.35588506, + 0.2136833, 0.19304918, 0.020435851, 0.1563807, 0.10985168, 0.46050212, 0.69469714, 0.022877397, + 0.211754, 0.99064195, 0.10823577, 0.89251375, 0.20041913, 0.09518249, 0.19409119, 0.082446806, + 0.1033933, 0.93826735, 0.22326319, 0.7951004, 0.108295456, 0.5249412, 0.7338461, 0.53733635, + 0.7804776, 0.94167835, 0.9851669, 0.6573249, 0.09694284, 0.41636762, 0.42071435, 0.5785772, + 0.17650813, 0.12922545, 0.8063533, 0.5971035, 0.4714922, 0.13347372, 0.43969434, 0.53785807, + 0.2420099, 0.70572215, 0.9245171, 0.20888333, 0.16590436, 0.21725997, 0.2877079, 0.5262417, + 0.07437589, 0.16921617, 0.19905105, 0.3776575, 0.96237653, 0.58104134, 0.2475896, 0.6887421, + 0.459203, 0.48309952, 0.3759031, 0.16817336, 0.47533524, 0.037372224, 0.92593455, 0.7953864, + 0.5699276, 0.52965856, 0.7160056, 0.07119369, 0.28882924, 0.5969877, 0.6109546, 0.96991956, + 0.498573, 0.68540514, 0.5530905, 0.40257332, 0.6004241, 0.52496284, 0.37143198, 0.56321764, + 0.6539704, 0.45892516, 0.58294904, 0.9277267, 0.21731657, 0.043056846, 0.6162007, 0.5954668, + 0.88163584, 0.11761114, 0.13790047, 0.98839265, 0.7575706, 0.271521, 0.06252285, 0.20463766, + 0.7797876, 0.1291307, 0.6389557, 0.6362458, 0.5012543, 0.21651421, 0.23741248, 0.4773882, + 0.5582616, 0.22913149, 0.8790845, 0.27697143, 0.02795082, 0.8450163, 0.08831802, 0.9342402, + 0.11166756, 0.8126855, 0.51420295, 0.016410068, 0.4544232, 0.99820787, 0.5780698, 0.5268707, + 0.9134579, 0.12053883, 0.18955784, 0.1712181, 0.45908722, 0.62256193, 0.21234894, 0.227052, + 0.62288225, 0.34845284, 0.6227857, 0.4712934, 0.8860071, 0.73518616, 0.06196327, 0.4374562, + 0.22151268, 0.10556084, 0.3694651, 0.9881851, 0.16397232, 0.3392293, 0.56751597, 0.036619555, + 0.029293122, 0.20366028, 0.87672514, 0.94488513, 0.757318, 0.04611278, 0.75021446, 0.78157973, + 0.5510609, 0.112084985, 0.7227879, 0.38071552, 0.026956385, 0.0661944, 0.01830097, 0.93569964, + 0.016782548, 0.6520325, 0.65408915, 0.67949796, 0.22223058, 0.6170246, 0.048233118, 0.37648138, + 0.7507222, 0.07674675, 0.7948974, 0.34886235, 0.6287428, 0.5898847, 0.36289844, 0.5742286, + 0.55302286, 0.15293828, 0.14192496, 0.25542694, 0.74583685, 0.26746377, 0.46973395, 0.5767695, + 0.59823835, 0.841206, 0.9202325, 0.7739221, 0.012398226, 0.6812478, 0.4104998, 0.15531828, + 0.087259874, 0.43376547, 0.9714025, 0.5119398, 0.68514013, 0.888018, 0.814389, 0.4122685, + 0.15542716, 0.5002437, 0.19416295, 0.6805713, 0.2512154, 0.4013521, 0.15283692, 0.96117616, + 0.7491866, 0.14855935, 0.8276927, 0.8740181, 0.92426944, 0.762874, 0.18986279, 0.7493188, + 0.18229857, 0.07731968, 0.08125962, 0.3810246, 0.6967921, 0.27431104, 0.36408317, 0.06947445, + 0.66624695, 0.6395791, 0.2616025, 0.19497731, 0.6184822, 0.85095865, 0.88908845, 0.66500485, + 0.33854932, 0.72965646, 0.099999785, 0.24559312, 0.07330083, 0.78916264, 0.32555407, 0.19688624, + 0.6883691, 0.9590563, 0.024735536, 0.86383885, 0.8535551, 0.53648174, 0.23104885, 0.32438585, + 0.24390268, 0.22208378, 0.32964125, 0.60782045, 0.8067584, 0.4333644, 0.71547633, 0.88111615, + 0.13616055, 0.1246885, 0.014324361, 0.6116363, 0.13974965, 0.9578596, 0.34269398, 0.89822793, + 0.25947088, 0.16268782, 0.53546876, 0.19461296, 0.6628742, 0.94426966, 0.67601794, 0.3931359, + 0.7517656, 0.88437337, 0.6926555, 0.7377358, 0.2495755, 0.50024426, 0.21591938, 0.12976523, + 0.40853027, 0.93721664, 0.95107466, 0.39639843, 0.52131736, 0.28126806, 0.85824645, 0.9051849, + 0.01418011, 0.21888365, 0.10943257, 0.94861233, 0.77483827, 0.7139178, 0.057136595, 0.73050946, + 0.61636233, 0.1265076, 0.60436803, 0.69086725, 0.0010129241, 0.036435887, 0.6615116, 0.299633, + 0.54606587, 0.9365053, 0.85605484, 0.922385, 0.7407089, 0.9777405, 0.63154066, 0.63591623, + 0.90876913, 0.88455915, 0.20310602, 0.20253302, 0.0067849625, 0.94629556, 0.37691054, 0.9782028, + 0.30444136, 0.63028383, 0.18043286, 0.4439906, 0.8348371, 0.7274056, 0.61829764, 0.037847787, + 0.8272368, 0.96214604, 0.12137349, 0.123067886, 0.8958763, 0.52505213, 0.1287523, 0.3720944, + 0.275705, 0.65144163, 0.85033256, 0.58481205, 0.42521322, 0.93586147, 0.16447607, 0.036439568, + 0.58734304, 0.47351632, 0.039843205, 0.8902792, 0.5108118, 0.8546036, 0.72372454, 0.6700668, + 0.7495971, 0.6261652, 0.3864259, 0.3707291, 0.85600305, 0.21752104, 0.4647959, 0.81866026, + 0.3182077, 0.818207, 0.09514821, 0.77856284, 0.85636705, 0.50847274, 0.74004, 0.38371703, + 0.7558068, 0.83101165, 0.926828, 0.35534334, 0.09596299, 0.7920985, 0.5529896, 0.36857986, + 0.46580777, 0.14399329, 0.85664755, 0.3613208, 0.6875624, 0.72801846, 0.527036, 0.9726332, + 0.23842148, 0.45130673, 0.37347084, 0.26971108, 0.1386262, 0.7580232, 0.51609135, 0.058183976, + 0.18664573, 0.031672336, 0.26660433, 0.6070062, 0.84071326, 0.38591322, 0.18007252, 0.07887025, + 0.73347634, 0.6561262, 0.13447234, 0.67980015, 0.92777556, 0.3683812, 0.5741038, 0.95749855, + 0.07317559, 0.017846042, 0.9049213, 0.7120097, 0.36087346, 0.10347511, 0.13109785, 0.5901893, + 0.29117107, 0.12251501, 0.54014134, 0.40506032, 0.13500193, 0.4703289, 0.24509083, 0.9977836, + 0.3149203, 0.868644, 0.16869761, 0.06429065, 0.52549416, 0.94598347, 0.5278666, 0.079894565, + 0.9639208, 0.7777773, 0.62784445, 0.0314362, 0.5935461, 0.8472358, 0.04485763, 0.8700403, + 0.8772029, 0.4159723, 0.1965355, 0.120780155, 0.8531019, 0.80408156, 0.6973105, 0.08317062, + 0.9005745, 0.6764151, 0.3158351, 0.71819824, 0.84577185, 0.7750122, 0.94386834, 0.26314744, + 0.41103536, 0.13668874, 0.36487988, 0.059131548, 0.19968359, 0.50981313, 0.4320044, 0.12719214, + 0.48997945, 0.82502675, 0.74808896, 0.58309615, 0.47563064, 0.09966165, 0.9966431, 0.44393525, + 0.07765738, 0.67010105, 0.5278574, 0.71902966, 0.27379337, 0.12431067, 0.14468168, 0.5108387, + 0.1713335, 0.08552699, 0.16371617, 0.8490791, 0.63014835, 0.80966836, 0.23412272, 0.18890859, + 0.833909, 0.364697, 0.62040085, 0.45685738, 0.48235595, 0.98572606, 0.6703567, 0.3673898, + 0.9839679, 0.06934336, 0.6308007, 0.02807519, 0.0559926, 0.11421437, 0.60753995, 0.80091286, + 0.67977196, 0.87189984, 0.6405409, 0.17567077, 0.24715477, 0.22483869, 0.9893541, 0.2867247, + 0.9920071, 0.85404116, 0.887798, 0.114156604, 0.34609696, 0.5829253, 0.49704382, 0.6803111, + 0.590904, 0.5591804, 0.7491872, 0.110933654, 0.4792608, 0.53978574, 0.9615793, 0.091931306, + 0.99974436, 0.1604676, 0.73506176, 0.20445003, 0.49350995, 0.11660648, 0.4548461, 0.057119142, + 0.47798702, 0.36280334, 0.16930713, 0.7582485, 0.16912746, 0.058451943, 0.9417538, 0.6090703, + 0.37534294, 0.33367616, 0.4648503, 0.6283148, 0.09792804, 0.5562001, 0.021292835, 0.40104258, + 0.57229954, 0.95048964, 0.4371712, 0.49681222, 0.36502722, 0.49660632, 0.32165202, 0.13998619, + 0.9103205, 0.54860955, 0.17592642, 0.086687185, 0.48977694, 0.78490406, 0.79321474, 0.8754006, + 0.39919505, 0.8306789, 0.63616955, 0.98329365, 0.41361818, 0.73879534, 0.5111836, 0.53245205, + 0.6174266, 0.14011684, 0.7355907, 0.14558467, 0.074935436, 0.33326453, 0.99400324, 0.44354424, + 0.13917476, 0.33401918, 0.6321505, 0.5430203, 0.6794353, 0.9580339, 0.69209194, 0.9813807, + 0.041151315, 0.029320937, 0.8479279, 0.6205179, 0.8825255, 0.85506666, 0.11929336, 0.5904389, + 0.5404614, 0.58944976, 0.22911972, 0.26724914, 0.92003053, 0.037999198, 0.9874244, 0.83350426, + 0.439306, 0.9047191, 0.87938565, 0.22491038, 0.7610156, 0.17606735, 0.06505076, 0.577056, + 0.5546063, 0.7323822, 0.94751245, 0.15575777, 0.15275358, 0.2501944, 0.19596528, 0.44116116, + 0.13858697, 0.65478885, 0.9421423, 0.38429725, 0.89086735, 0.8906657, 0.64992654, 0.7623599, + 0.020823486, 0.14515182, 0.6051233, 0.4854857, 0.10414482, 0.7267541, 0.52351373, 0.10117556, + 0.34659478, 0.7986462, 0.10371433, 0.7747162, 0.078648254, 0.46718153, 0.22036512, 0.86508393, + 0.9642702, 0.27087194, 0.06591158, 0.15014334, 0.9075542, 0.9635356, 0.4376853, 0.290267, + 0.39348447, 0.78795856, 0.12866218, 0.26524165, 0.095856875, 0.6031271, 0.94263685, 0.54864025, + 0.25479257, 0.11702571, 0.20408688, 0.6158638, 0.5709441, 0.57956505, 0.47291118, 0.8278522, + 0.20886846, 0.8463369, 0.809163, 0.35410735, 0.14648008, 0.4212491, 0.36251292, 0.67140543, + 0.43442374, 0.07705836, 0.42002708, 0.6199954, 0.8247542, 0.4997832, 0.8548057, 0.057287898, + 0.7074665, 0.31485626, 0.09200123, 0.31618625, 0.59809196, 0.25827205, 0.0053186826, 0.7434676, + 0.85600936, 0.5550741, 0.5199236, 0.96162254, 0.26309466, 0.60450137, 0.29413986, 0.38470513, + 0.79796076, 0.23805939, 0.9412749, 0.061217327, 0.15437259, 0.083577976, 0.14378692, 0.9722354, + 0.42544565, 0.45725676, 0.8308179, 0.018798511, 0.18310007, 0.32264143, 0.72388613, 0.75500935, + 0.26221997, 0.146799, 0.90839726, 0.25608784, 0.48756382, 0.15672493, 0.22976026, 0.9505964, + 0.8410182, 0.06569535, 0.498098, 0.591406, 0.90132546, 0.40089035, 0.40831077, 0.82992244, + 0.7829185, 0.03532195, 0.8220347, 0.5866948, 0.55850834, 0.7935884, 0.9029153, 0.62388855, + 0.17106935, 0.11976584, 0.8907406, 0.14083518, 0.42745417, 0.9865202, 0.5603676, 0.53336793, + 0.83118796, 0.7649143, 0.6994026, 0.116295666, 0.69610405, 0.03805204, 0.8971413, 0.6412358, + 0.008299126, 0.9906785, 0.22019914, 0.08867724, 0.58548, 0.5523809, 0.07090994, 0.024555296, + 0.048945986, 0.0008954834, 0.23588002, 0.14777812, 0.5006067, 0.13719136, 0.19650105, 0.46863157, + 0.24388368, 0.28450873, 0.08501847, 0.367798, 0.26598433, 0.08892508, 0.5231422, 0.854498, + 0.50532776, 0.96473, 0.760218, 0.13641119, 0.7014878, 0.2920151, 0.13381833, 0.74486643, + 0.13818067, 0.18079887, 0.57839566, 0.56782985, 0.5733893, 0.8142381, 0.038408525, 0.61868846, + 0.048855904, 0.8661853, 0.091889195, 0.42655867, 0.75064015, 0.41258946, 0.0327612, 0.6939966, + 0.5684132, 0.230771, 0.87241197, 0.41159534, 0.95303357, 0.5293433, 0.37525147, 0.91937405, + 0.46753627, 0.3657011, 0.58334947, 0.62074995, 0.79216284, 0.9344987, 0.32306752, 0.7569309, + 0.8670772, 0.49101356, 0.0095974505, 0.31980786, 0.5587957, 0.6286712, 0.8952423, 0.42964563, + 0.24610022, 0.46633002, 0.31894207, 0.39979902, 0.99703586, 0.09658354, 0.10385787, 0.092738345, + 0.9319688, 0.066221446, 0.567998, 0.47071677, 0.41960314, 0.722223, 0.79183286, 0.60883737, + 0.8055474, 0.6590216, 0.10029357, 0.20768817, 0.2308886, 0.41765857, 0.82652557, 0.11435715, + 0.5431178, 0.3349583, 0.55948156, 0.2596266, 0.402992, 0.7129533, 0.13520089, 0.939742, + 0.33552873, 0.44276634, 0.16549513, 0.48670354, 0.2104012, 0.9754525, 0.9223382, 0.37095273, + 0.26184326, 0.4906111, 0.68878114, 0.7259414, 0.3665008, 0.8523507, 0.33732775, 0.14485414, + 0.69918066, 0.40076008, 0.5142605, 0.89977413, 0.52837765, 0.6875541, 0.19875702, 0.8284416, + 0.6398044, 0.20458493, 0.8566812, 0.66207755, 0.537102, 0.84423125, 0.6897463, 0.2190155, + 0.93102056, 0.62825596, 0.13518804, 0.9768368, 0.5567279, 0.30512935, 0.39843616, 0.83009493, + 0.7366834, 0.72934085, 0.9458449, 0.7402775, 0.7288774, 0.100584194, 0.7478564, 0.69076705, + 0.99763054, 0.41462737, 0.5604459, 0.002231921, 0.19869287, 0.23542677, 0.41136438, 0.6479746, + 0.24400933, 0.33705348, 0.8468991, 0.0058162767, 0.11877123, 0.26026058, 0.83385074, 0.417612, + 0.80086476, 0.46976563, 0.79492086, 0.73824483, 0.71716267, 0.36049098, 0.58812624, 0.3940513, + 0.0023239073, 0.68416554, 0.1630907, 0.7990368, 0.74170923, 0.45847952, 0.0995642, 0.5392202, + 0.45672858, 0.16591415, 0.664447, 0.12247461, 0.28378534, 0.6875144, 0.020322617, 0.6955938, + 0.21689159, 0.48721343, 0.7328274, 0.21967441, 0.45823023, 0.39261988, 0.7113237, 0.47642282, + 0.8954901, 0.52823293, 0.9394127, 0.25911182, 0.30566335, 0.009611528, 0.9736044, 0.63713956, + 0.82650113, 0.16639459, 0.99990803, 0.5145273, 0.07233607, 0.6123276, 0.9062654, 0.7855298, + 0.23748927, 0.30767888, 0.5490877, 0.9528571, 0.5958136, 0.71137613, 0.13382663, 0.11335034, + 0.449443, 0.09932706, 0.52135324, 0.22994924, 0.6276635, 0.36845186, 0.93582106, 0.609704, + 0.9728418, 0.68666786, 0.9035467, 0.21347627, 0.51906675, 0.8404524, 0.2335569, 0.44711703, + 0.19230975, 0.027307436, 0.29597348, 0.11739075, 0.6876064, 0.5057953, 0.6232577, 0.604564, + 0.58094805, 0.94729763, 0.9821851, 0.15055138, 0.8435322, 0.7584666, 0.8806093, 0.18411398, + 0.3944063, 0.8260624, 0.8096688, 0.20633629, 0.48825827, 0.74365515, 0.009476059, 0.45804924, + 0.23057352, 0.39020398, 0.5416855, 0.3856682, 0.7087808, 0.69278914, 0.26646304, 0.39703688, + 0.074121974, 0.10197067, 0.76054734, 0.5685061, 0.41540262, 0.016435882, 0.42574394, 0.94364774, + 0.47606933, 0.91678923, 0.6490012, 0.68036586, 0.38626674, 0.78526974, 0.7661718, 0.2143752, + 0.80605865, 0.7194327, 0.81907, 0.69300437, 0.030783592, 0.027220597, 0.9588587, 0.4486546, + 0.017831376, 0.83792424, 0.8868172, 0.2974024, 0.9641097, 0.23758952, 0.8957832, 0.8881589, + 0.6808346, 0.5851483, 0.0764294, 0.74156153, 0.9979193, 0.3121031, 0.7687113, 0.37797043, + 0.40031847, 0.86602104, 0.730267, 0.57146907, 0.094653964, 0.32911018, 0.07178252, 0.4453038, + 0.62403214, 0.32731032, 0.5796096, 0.9893481, 0.87371916, 0.5734587, 0.3662533, 0.046901383, + 0.14311191, 0.31189272, 0.5506748, 0.5774784, 0.12961864, 0.12834151, 0.97953796, 0.23847981, + 0.021006035, 0.76084226, 0.99953127, 0.8011185, 0.7088403, 0.024610326, 0.21645589, 0.49395552, + 0.9507214, 0.44109955, 0.2926859, 0.16476253, 0.29695365, 0.3873897, 0.35400063, 0.6887212, + 0.7661417, 0.44151342, 0.67337024, 0.6367994, 0.65797997, 0.906435, 0.014439769, 0.10737592, + 0.21889497, 0.029528014, 0.5984496, 0.6860266, 0.76142836, 0.19123298, 0.24835177, 0.27197698, + 0.8864831, 0.49178717, 0.550463, 0.3338117, 0.32957888, 0.27066407, 0.7364635, 0.59942186, + 0.11085444, 0.08565405, 0.03862678, 0.4326196, 0.28077278, 0.20149076, 0.7499477, 0.7557222, + 0.95789206, 0.86195356, 0.8113367, 0.6881052, 0.45497125, 0.34273857, 0.5804998, 0.11457099, + 0.7464025, 0.8921554, 0.5822235, 0.6793123, 0.42616072, 0.5304293, 0.7325272, 0.7594884, + 0.19274779, 0.02070892, 0.27827948, 0.8051665, 0.83692664, 0.020188946, 0.35914233, 0.49547768, + 0.70504993, 0.07394841, 0.525945, 0.5723259, 0.8678083, 0.5818202, 0.8266031, 0.017404223, + 0.27958027, 0.84272736, 0.7281345, 0.8994748, 0.3798963, 0.5602465, 0.8170057, 0.5437445, + 0.9112873, 0.43589205, 0.5874092, 0.4374235, 0.68844056, 0.057151183, 0.1732611, 0.58042514, + 0.35312688, 0.2791384, 0.23987181, 0.26006386, 0.9232113, 0.94478124, 0.9187956, 0.93770313, + 0.50281125, 0.31585902, 0.9830553, 0.38102284, 0.8167936, 0.008173941, 0.24676272, 0.16458233, + 0.06555225, 0.5648193, 0.39973202, 0.58343333, 0.8022948, 0.8330524, 0.3795921, 0.63250124, + 0.20370321, 0.734535, 0.8938792, 0.40103462, 0.43277976, 0.92171884, 0.8070371, 0.64789873, + 0.9006873, 0.94551986, 0.21919903, 0.5886699, 0.34194836, 0.5665393, 0.09419294, 0.33479902, + 0.92393184, 0.7904314, 0.39666355, 0.0640373, 0.5771913, 0.43598288, 0.7269509, 0.90311337, + 0.18912931, 0.42282686, 0.37187123, 0.12362129, 0.65741915, 0.5898278, 0.77813035, 0.5200745, + 0.8995463, 0.6073706, 0.056360655, 0.18867631, 0.05090209, 0.51776093, 0.5049234, 0.5810924, + 0.5088219, 0.3351565, 0.48033553, 0.87127376, 0.7889749, 0.65809286, 0.822634, 0.49901298, + 0.47062632, 0.064933024, 0.65950155, 0.0118634105, 0.43638885, 0.3155548, 0.055309944, 0.76772034, + 0.007584079, 0.9907658, 0.2119053, 0.0099529, 0.5498476, 0.68341583, 0.9904796, 0.31085956, + 0.16738948, 0.6991246, 0.6891236, 0.7345778, 0.5101786, 0.9055166, 0.28389692, 0.40617087, + 0.285508, 0.8155711, 0.5552154, 0.24203478, 0.95564735, 0.8556771, 0.11413846, 0.53103644, + 0.6001929, 0.8728583, 0.652995, 0.59248614, 0.9303262, 0.76626694, 0.083685614, 0.5839915, + 0.55206066, 0.28864032, 0.18109223, 0.06013629, 0.30585563, 0.49497047, 0.031244803, 0.8254061, + 0.34467688, 0.16947599, 0.70388424, 0.089850344, 0.9689693, 0.088056214, 0.9888344, 0.56510967, + 0.7810361, 0.25333068, 0.72635543, 0.6208177, 0.7603394, 0.81327516, 0.812073, 0.15190694, + 0.8766273, 0.68086886, 0.40976003, 0.6769893, 0.03042084, 0.39799348, 0.38053334, 0.40112254, + 0.61543894, 0.10513203, 0.18251711, 0.22153829, 0.7244244, 0.22376063, 0.10031522, 0.79053754, + 0.7843263, 0.7298093, 0.8973579, 0.7861713, 0.15179288, 0.024288114, 0.56206715, 0.51213664, + 0.8840239, 0.08788527, 0.81145, 0.6769955, 0.039911535, 0.4628679, 0.82365215, 0.7387855, + 0.47656733, 0.029185295, 0.18350895, 0.62498677, 0.08521046, 0.35425547, 0.7949853, 0.9466834, + 0.78894264, 0.30276173, 0.4744114, 0.86383724, 0.9055391, 0.7672961, 0.8406853, 0.5572755, + 0.15301545, 0.9358179, 0.83649135, 0.030530108, 0.9159173, 0.025901658, 0.00011405395, 0.8523392, + 0.1188017, 0.89762336, 0.7929654, 0.9425356, 0.58654344, 0.7035378, 0.361211, 0.15257105, + 0.2814799, 0.44373164, 0.744971, 0.6952391, 0.040251687, 0.47532842, 0.70532703, 0.43007088, + 0.93482405, 0.9506745, 0.9972287, 0.84903115, 0.5498767, 0.6982299, 0.60659754, 0.116727814, + 0.24719998, 0.25417453, 0.5239801, 0.10409364, 0.6263765, 0.79312205, 0.82286817, 0.45066565, + 0.02907124, 0.33116972, 0.5061851, 0.1875871, 0.56129, 0.8524497, 0.36013994, 0.085404865, + 0.94155073, 0.32184035, 0.58235735, 0.46180746, 0.022325099, 0.14544618, 0.5170238, 0.67768705, + 0.23049083, 0.4064205, 0.09570609, 0.9652428, 0.028672969, 0.1510829, 0.30246252, 0.4205718, + 0.2910258, 0.67623764, 0.69533557, 0.33236894, 0.17955771, 0.25711736, 0.5261945, 0.48835787}; + +float rndf() { + static int _cur_rnd = 0; + if (_cur_rnd > _rnd_count) + _cur_rnd = 0; + return _rnd[_cur_rnd++]; +} diff --git a/samples/rnd.h b/samples/rnd.h new file mode 100644 index 0000000..abf280c --- /dev/null +++ b/samples/rnd.h @@ -0,0 +1 @@ +float rndf(); diff --git a/samples/tests/arcs.cpp b/samples/tests/arcs.cpp new file mode 100644 index 0000000..012c583 --- /dev/null +++ b/samples/tests/arcs.cpp @@ -0,0 +1,73 @@ +#include "VkvgTest.hpp" + +TEST(arc_scaled_up) { + VkvgContext ctx = vkvg_create(test->surf); + + vkvg_set_source_rgb(ctx, 1, 1, 1); + vkvg_paint(ctx); + vkvg_set_source_rgb(ctx, 0, 0, 0); + + vkvg_scale(ctx, 10, 10); + vkvg_arc(ctx, 20, 20, 2.0f, 0, M_PIF / 2.f); + vkvg_stroke(ctx); + + vkvg_destroy(ctx); +} +TEST(arc_sizes) { + VkvgContext ctx = vkvg_create(test->surf); + + vkvg_set_source_rgb(ctx, 1, 1, 1); + vkvg_paint(ctx); + vkvg_set_source_rgb(ctx, 0, 0, 0); + + draw_growing_circles(ctx, 100, 40); + vkvg_stroke(ctx); + + vkvg_destroy(ctx); +} +TEST(arc_test) { + VkvgContext ctx = vkvg_create(test->surf); + + vkvg_set_source_rgb(ctx, 1, 1, 1); + vkvg_paint(ctx); + vkvg_set_source_rgb(ctx, 0, 0, 0); + + vkvg_set_source_rgb(ctx, 1, 0, 1); + vkvg_set_line_width(ctx, 5.0); + vkvg_arc(ctx, 100, 100, 20, 0, M_PIF / 2); + vkvg_stroke(ctx); + + vkvg_set_source_rgb(ctx, 0, 1, 1); + vkvg_arc_negative(ctx, 100, 100, 20, 0, M_PIF / 2); + vkvg_stroke(ctx); + + vkvg_set_source_rgb(ctx, 1, 0, 1); + vkvg_arc(ctx, 100, 200, 20, M_PIF / 2, 0); + vkvg_stroke(ctx); + + vkvg_set_source_rgb(ctx, 0, 1, 1); + vkvg_arc_negative(ctx, 100, 200, 20, M_PIF / 2, 0); + vkvg_stroke(ctx); + + vkvg_set_source_rgb(ctx, 0, 0, 1); + vkvg_set_line_width(ctx, 10.0); + vkvg_arc(ctx, 350, 100, 40, 0, M_PIF * 2); + vkvg_stroke(ctx); + + vkvg_set_source_rgb(ctx, 0, 1, 0); + vkvg_set_line_width(ctx, 1.0); + vkvg_arc(ctx, 150, 100, 3.5, 0, M_PIF * 2); + vkvg_stroke(ctx); + vkvg_arc(ctx, 200, 200, 10, 0, M_PIF * 2); + vkvg_fill(ctx); + + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_scale(ctx, 3, 3); + vkvg_arc(ctx, 150, 100, 3.5, 0, M_PIF * 2); + vkvg_stroke(ctx); + vkvg_arc(ctx, 200, 200, 10, 0, M_PIF * 2); + vkvg_fill(ctx); + + vkvg_destroy(ctx); +} + diff --git a/samples/tests/circles.cpp b/samples/tests/circles.cpp new file mode 100644 index 0000000..a302ec8 --- /dev/null +++ b/samples/tests/circles.cpp @@ -0,0 +1,46 @@ +#include "VkvgTest.hpp" + +TEST(circles_scaled_up) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_source_rgb(ctx, 1, 1, 1); + + vkvg_scale(ctx, 100, 100); + vkvg_arc(ctx, 2, 2, 0.5f, 0, M_PIF * 2); + vkvg_stroke(ctx); + + vkvg_destroy(ctx); +} +TEST(circles_fill_and_stroke) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_set_source_rgba(ctx, 0, 0.1f, 0.8f, 0.5f); + vkvg_set_line_width(ctx, 10); + + vkvg_arc(ctx, 300, 300, 150.f, 0, M_PIF * 2); + vkvg_fill_preserve(ctx); + vkvg_stroke(ctx); + + vkvg_destroy(ctx); +} +TEST(circles_sizes) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_source_rgb(ctx, 1, 1, 1); + + draw_growing_circles(ctx, 100, 40); + vkvg_fill(ctx); + + draw_growing_circles(ctx, 200, 40); + vkvg_stroke(ctx); + + vkvg_set_source_rgba(ctx, 0, 0, 1, 0.4F); + draw_growing_circles(ctx, 300, 40); + vkvg_fill_preserve(ctx); + vkvg_set_line_width(ctx, 5); + vkvg_stroke(ctx); + + vkvg_destroy(ctx); +} diff --git a/samples/tests/clip.cpp b/samples/tests/clip.cpp new file mode 100644 index 0000000..bbc3b40 --- /dev/null +++ b/samples/tests/clip.cpp @@ -0,0 +1,168 @@ +#include "VkvgTest.hpp" +TEST(clipped_paint_ec) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_NON_ZERO); + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_paint(ctx); + vkvg_set_source_rgb(ctx, 0, 1, 0); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_clip(ctx); + vkvg_paint(ctx); + vkvg_destroy(ctx); +} +TEST(clipped_paint_eo) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_paint(ctx); + vkvg_set_source_rgb(ctx, 0, 1, 0); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_clip(ctx); + vkvg_paint(ctx); + + vkvg_destroy(ctx); +} +TEST(clipped_paint2_ec) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_NON_ZERO); + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_paint(ctx); + vkvg_set_source_rgb(ctx, 0, 1, 0); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_clip(ctx); + vkvg_paint(ctx); + + vkvg_reset_clip(ctx); + vkvg_rectangle(ctx, 200, 200, 300, 200); + vkvg_set_source_rgb(ctx, 0, 0, 1); + vkvg_paint(ctx); + + vkvg_destroy(ctx); +} +TEST(clipped_paint2_eo) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_paint(ctx); + vkvg_set_source_rgb(ctx, 0, 1, 0); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_clip(ctx); + vkvg_paint(ctx); + vkvg_reset_clip(ctx); + vkvg_rectangle(ctx, 200, 200, 300, 200); + vkvg_set_source_rgb(ctx, 0, 0, 1); + vkvg_paint(ctx); + + vkvg_destroy(ctx); +} +TEST(clipped_transformed_ec) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_NON_ZERO); + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_paint(ctx); + vkvg_rotate(ctx, 0.2f); + vkvg_set_source_rgb(ctx, 0, 1, 0); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_clip(ctx); + vkvg_paint(ctx); + vkvg_destroy(ctx); +} +TEST(clip_transformed_ec) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_NON_ZERO); + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_paint(ctx); + vkvg_rotate(ctx, 0.1f); + vkvg_set_source_rgb(ctx, 0, 1, 0); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_clip(ctx); + vkvg_paint(ctx); + vkvg_translate(ctx, 200, 100); + vkvg_set_source_rgb(ctx, 0, 0, 1); + vkvg_paint(ctx); + + vkvg_destroy(ctx); +} +TEST(clipped_transformed_eo) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_paint(ctx); + vkvg_rotate(ctx, 0.2f); + vkvg_set_source_rgb(ctx, 0, 1, 0); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_clip(ctx); + vkvg_paint(ctx); + + vkvg_destroy(ctx); +} +TEST(test_clip) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); + vkvg_move_to(ctx, 10, 10); + vkvg_line_to(ctx, 400, 150); + vkvg_line_to(ctx, 900, 10); + vkvg_line_to(ctx, 700, 450); + vkvg_line_to(ctx, 900, 750); + vkvg_line_to(ctx, 500, 650); + vkvg_line_to(ctx, 100, 800); + vkvg_line_to(ctx, 150, 400); + vkvg_clip_preserve(ctx); + vkvg_set_operator(ctx, VKVG_OPERATOR_CLEAR); + vkvg_fill_preserve(ctx); + vkvg_clip(ctx); + vkvg_set_operator(ctx, VKVG_OPERATOR_OVER); + + vkvg_set_source_rgb(ctx, 1, 0, 0); + // vkvg_set_line_width(ctx,10); + // vkvg_stroke(ctx); + vkvg_paint(ctx); + + vkvg_destroy(ctx); +} +TEST(test_clip2) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_NON_ZERO); + vkvg_rectangle(ctx, 50, 50, 500, 500); + vkvg_clip(ctx); + + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_paint(ctx); + + vkvg_save(ctx); + vkvg_rectangle(ctx, 100, 100, 350, 350); + vkvg_clip(ctx); + vkvg_save(ctx); + + vkvg_set_source_rgb(ctx, 1, 1, 0); + vkvg_paint(ctx); + + vkvg_rectangle(ctx, 200, 200, 200, 200); + vkvg_clip(ctx); + + vkvg_set_source_rgb(ctx, 0, 1, 0); + vkvg_paint(ctx); + + vkvg_restore(ctx); + + vkvg_rectangle(ctx, 350, 350, 420, 420); + vkvg_set_source_rgb(ctx, 0, 0, 1); + vkvg_fill(ctx); + + vkvg_restore(ctx); + + // vkvg_clip(ctx); + // + /*vkvg_clip_preserve(ctx); + vkvg_set_operator(ctx, VKVG_OPERATOR_CLEAR); + vkvg_fill_preserve(ctx);*/ + // vkvg_clip(ctx); + // vkvg_set_operator(ctx, VKVG_OPERATOR_OVER); + /*vkvg_rectangle(ctx, 200,200,220,220); + vkvg_set_source_rgb(ctx,1,0,0); + vkvg_paint(ctx);*/ + + vkvg_destroy(ctx); +} diff --git a/samples/tests/compositing.cpp b/samples/tests/compositing.cpp new file mode 100644 index 0000000..6ef062e --- /dev/null +++ b/samples/tests/compositing.cpp @@ -0,0 +1,31 @@ +#include "VkvgTest.hpp" + +TEST(compositing) { + VkvgContext ctx = vkvg_create(test->surf); + + vkvg_set_source_rgba(ctx, 1, 0, 0, 0.5f); + vkvg_rectangle(ctx, 100, 100, 200, 200); + vkvg_fill(ctx); + + vkvg_set_source_rgba(ctx, 0, 0, 1, 0.5f); + vkvg_rectangle(ctx, 200, 200, 200, 200); + vkvg_fill(ctx); + + vkvg_destroy(ctx); +} + +TEST(opacity) { + VkvgContext ctx = vkvg_create(test->surf); + + vkvg_set_source_rgba(ctx, 1, 0, 0, 1.0f); + vkvg_rectangle(ctx, 100, 100, 200, 200); + vkvg_fill(ctx); + + vkvg_set_opacity(ctx, 0.5f); + + vkvg_set_source_rgba(ctx, 0, 0, 1, 1.0f); + vkvg_rectangle(ctx, 200, 200, 200, 200); + vkvg_fill(ctx); + + vkvg_destroy(ctx); +} diff --git a/samples/tests/curve.cpp b/samples/tests/curve.cpp new file mode 100644 index 0000000..9041f2c --- /dev/null +++ b/samples/tests/curve.cpp @@ -0,0 +1,187 @@ +#include "VkvgTest.hpp" + + +//"M80 170 C100 170 160 170 180 170 lZ" +/*TEST(curve2) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_set_line_width(ctx, 20); + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_move_to(ctx, 80, 170); + vkvg_curve_to(ctx, 100, 170, 160, 171, 180, 170); + vkvg_close_path(ctx); + vkvg_stroke(ctx); + vkvg_destroy(ctx); +}*/ +TEST(curve) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_line_width(ctx, 20); + + vkvg_scale(ctx, 2, 2); + vkvg_set_line_join(ctx, VKVG_LINE_JOIN_BEVEL); + + // vkvg_arc (ctx, 200, 500, 100, 0, M_PI); + + vkvg_set_source_rgb(ctx, 0.5f, 0, 0); + + /*vkvg_move_to(ctx,100,100); + vkvg_line_to(ctx,300,100); + vkvg_line_to(ctx,500,300); + vkvg_line_to(ctx,300,500); + //vkvg_arc (ctx, 200, 500, 100, 0, M_PI); + vkvg_line_to(ctx,300,700); + vkvg_line_to(ctx,100,500);*/ + + /*vkvg_arc(ctx, 300, 300, 100, 0, M_PI); + vkvg_line_to(ctx,100,200); + vkvg_line_to(ctx,200,100); + vkvg_arc(ctx, 250, 100, 50, M_PI, M_PI * 1.5f); + vkvg_line_to(ctx,350,50); + vkvg_arc(ctx, 350, 100, 50, M_PI*1.5f, M_PI * 2.0f); + + vkvg_stroke(ctx); + vkvg_translate(ctx,400,30); + + */ + // vkvg_set_fill_rule(ctx,VKVG_FILL_RULE_EVEN_ODD); + vkvg_translate(ctx, 200, 30); + vkvg_arc(ctx, 200, 200, 20, 0, M_PIF * 2); + // vkvg_stroke(ctx); + + vkvg_set_source_rgba(ctx, 0.5f, 0.0f, 1.0f, 0.5f); + vkvg_move_to(ctx, 100, 100); + vkvg_line_to(ctx, 200, 100); + // vkvg_move_to(ctx,200,100); + vkvg_curve_to(ctx, 250, 100, 300, 150, 300, 200); + vkvg_line_to(ctx, 300, 300); + vkvg_curve_to(ctx, 300, 350, 250, 400, 200, 400); + vkvg_line_to(ctx, 100, 400); + vkvg_curve_to(ctx, 50, 400, 10, 350, 10, 300); + vkvg_line_to(ctx, 10, 200); + vkvg_curve_to(ctx, 10, 150, 50, 100, 100, 100); + // vkvg_close_path(ctx); + vkvg_fill_preserve(ctx); + vkvg_set_source_rgba(ctx, 0.1f, 0.3f, 0.7f, 0.5f); + vkvg_stroke(ctx); + + vkvg_destroy(ctx); +} + +TEST(curved_rect) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + float x = 50, y = 50, width = 150, height = 140, radius = 30; + + vkvg_scale(ctx, 2, 2); + // vkvg_rotate(ctx,0.5f); + + vkvg_set_line_width(ctx, 15); + vkvg_set_source_rgba(ctx, 0, 0.5f, 0.4f, 1); + + if ((radius > height / 2) || (radius > width / 2)) + radius = MIN(height / 2, width / 2); + + vkvg_move_to(ctx, x, y + radius); + vkvg_arc(ctx, x + radius, y + radius, radius, M_PIF, (float)-M_PI_2); + vkvg_line_to(ctx, x + width - radius, y); + vkvg_arc(ctx, x + width - radius, y + radius, radius, (float)-M_PI_2, 0); + vkvg_line_to(ctx, x + width, y + height - radius); + vkvg_arc(ctx, x + width - radius, y + height - radius, radius, 0, (float)M_PI_2); + vkvg_line_to(ctx, x + radius, y + height); + vkvg_arc(ctx, x + radius, y + height - radius, radius, (float)M_PI_2, M_PIF); + vkvg_line_to(ctx, x, y + radius); + vkvg_close_path(ctx); + vkvg_fill_preserve(ctx); + vkvg_set_source_rgba(ctx, 0.5f, 0, 0, 0.5f); + vkvg_stroke(ctx); + + vkvg_destroy(ctx); +} + +TEST(curve3) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_move_to(ctx, 100, 400); + vkvg_curve_to(ctx, 100, 100, 600, 700, 600, 400); + vkvg_curve_to(ctx, 1000, 100, 100, 800, 1000, 800); + vkvg_curve_to(ctx, 1000, 500, 700, 500, 700, 100); + vkvg_close_path(ctx); + + // vkvg_set_source_rgba (ctx, 0.5,0.0,1.0,0.5); + // vkvg_fill_preserve(ctx); + + vkvg_set_source_rgba(ctx, 1, 0, 0, 1); + vkvg_set_line_width(ctx, 40); + vkvg_stroke(ctx); + + vkvg_destroy(ctx); +} + +static bool fillAndStroke = true; + +TEST(curves_stroke_random) { + float w = (float)test->app->width; + float h = (float)test->app->height; + + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + for (uint32_t i = 0; i < test->app->testSize; i++) { + randomize_color(ctx); + float x1 = rndf() * w; + float y1 = rndf() * h; + + vkvg_move_to(ctx, x1, y1); + test->draw_random_curve(ctx); + + vkvg_stroke(ctx); + } + vkvg_destroy(ctx); +} + +void _long_curv(VkvgTest* test, vkvg_fill_rule_t fill_rule) { + float w = (float)test->app->width; + float h = (float)test->app->height; + + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + randomize_color(ctx); + float x1 = rndf() * w; + float y1 = rndf() * h; + vkvg_move_to(ctx, x1, y1); + + for (uint32_t i = 0; i < test->app->testSize; i++) { + test->draw_random_curve(ctx); + } + + if (fillAndStroke) { + vkvg_fill_preserve(ctx); + randomize_color(ctx); + vkvg_stroke(ctx); + } else + vkvg_fill(ctx); + + vkvg_destroy(ctx); +} + +TEST(long_curv_fill_nz) { + fillAndStroke = false; + _long_curv(test,VKVG_FILL_RULE_NON_ZERO); +} +TEST(long_curv_fill_eo) { + fillAndStroke = false; + _long_curv(test, VKVG_FILL_RULE_EVEN_ODD); +} +TEST(long_curv_fill_stroke_nz) { + fillAndStroke = true; + _long_curv(test, VKVG_FILL_RULE_NON_ZERO); +} +TEST(long_curv_fill_stroke_eo) { + fillAndStroke = true; + _long_curv(test, VKVG_FILL_RULE_EVEN_ODD); +} diff --git a/samples/tests/dashes.cpp b/samples/tests/dashes.cpp new file mode 100644 index 0000000..a642a10 --- /dev/null +++ b/samples/tests/dashes.cpp @@ -0,0 +1,96 @@ +#include "VkvgTest.hpp" + +static float dash_offset = 0; + +TEST(dashes0) { + dash_offset += 0.2f; + + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_set_source_rgb(ctx, 1, 1, 1); + vkvg_paint(ctx); + // const float dashes[] = {160.0f, 80}; + // float dashes[] = {7.0f, 3}; + float dashes[] = {100, 20, 20, 20}; + vkvg_set_line_cap(ctx, VKVG_LINE_CAP_ROUND); + vkvg_set_line_join(ctx, VKVG_LINE_JOIN_ROUND); + vkvg_set_dash(ctx, dashes, 4, dash_offset); + vkvg_set_line_width(ctx, 4); + vkvg_set_source_rgb(ctx, 0, 0, 1); + + vkvg_move_to(ctx, 50, 50); + vkvg_rel_line_to(ctx, 500, 0); + vkvg_rel_line_to(ctx, 0, 200); + vkvg_rel_line_to(ctx, 200, 0); + vkvg_rel_line_to(ctx, 0, 500); + vkvg_rel_line_to(ctx, -700, 0); + vkvg_close_path(ctx); + vkvg_stroke(ctx); + + dashes[0] = 0; + dashes[1] = 20; + vkvg_set_dash(ctx, dashes, 2, dash_offset); + + vkvg_set_source_rgb(ctx, 0, 1, 0); + + vkvg_move_to(ctx, 100, 100); + vkvg_rel_line_to(ctx, 400, 0); + vkvg_rel_line_to(ctx, 0, 200); + vkvg_rel_line_to(ctx, 200, 0); + vkvg_rel_line_to(ctx, 0, 400); + vkvg_rel_line_to(ctx, -600, 0); + vkvg_close_path(ctx); + vkvg_stroke(ctx); + + dashes[0] = 80; + dashes[1] = 20; + + vkvg_set_line_width(ctx, 10); + vkvg_set_source_rgb(ctx, 1, 0, 0); + + vkvg_set_dash(ctx, dashes, 2, dash_offset); + + vkvg_rectangle(ctx, 200, 300, 200, 200); + /*vkvg_move_to(ctx, 200,300); + vkvg_rel_line_to(ctx,200,0);*/ + vkvg_stroke(ctx); + + vkvg_destroy(ctx); +} + +TEST(dashes_long_curve) { + float w = (float)test->app->width; + float h = (float)test->app->height; + + VkvgContext ctx = vkvg_create(test->surf); + + randomize_color(ctx); + + float x1 = w * rand() / RAND_MAX; + float y1 = h * rand() / RAND_MAX; + vkvg_move_to(ctx, x1, y1); + + for (uint32_t i = 0; i < test->app->testSize; i++) + test->draw_random_curve(ctx); + + vkvg_stroke(ctx); + vkvg_destroy(ctx); +} +TEST(dashes_long_path) { + float w = (float)test->app->width; + float h = (float)test->app->height; + + VkvgContext ctx = vkvg_create(test->surf); + + randomize_color(ctx); + float x1 = w * rndf(); + float y1 = h * rndf(); + vkvg_move_to(ctx, x1, y1); + for (uint32_t i = 0; i < test->app->testSize; i++) { + x1 = w * rndf(); + y1 = h * rndf(); + vkvg_line_to(ctx, x1, y1); + } + vkvg_stroke(ctx); + vkvg_destroy(ctx); +} diff --git a/samples/tests/fill.cpp b/samples/tests/fill.cpp new file mode 100644 index 0000000..6e46275 --- /dev/null +++ b/samples/tests/fill.cpp @@ -0,0 +1,119 @@ +#include "VkvgTest.hpp" + +void draw(VkvgContext ctx) { + vkvg_set_source_rgba(ctx, 0, 0, 1, 0.5); + vkvg_rectangle(ctx, 100, 100, 200, 200); + vkvg_fill(ctx); + + vkvg_rectangle(ctx, 200, 200, 200, 200); + vkvg_set_source_rgba(ctx, 1, 0, 0, 0.5); + vkvg_fill(ctx); +} +TEST(rect_fill_nz) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_NON_ZERO); + + draw(ctx); + + vkvg_destroy(ctx); +} +TEST(rect_fill_eo) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); + + draw(ctx); + + vkvg_destroy(ctx); +} + +TEST(fill_nz) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_NON_ZERO); + + vkvg_set_source_rgba(ctx, 0.1f, 0.9f, 0.1f, 1.0f); + vkvg_move_to(ctx, 100, 100); + vkvg_rel_line_to(ctx, 50, 200); + vkvg_rel_line_to(ctx, 150, -100); + vkvg_rel_line_to(ctx, 100, 200); + vkvg_rel_line_to(ctx, -100, 100); + vkvg_rel_line_to(ctx, -10, -100); + vkvg_rel_line_to(ctx, -190, -50); + vkvg_close_path(ctx); + + vkvg_fill(ctx); + + vkvg_destroy(ctx); +} +TEST(fill_eo) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); + + vkvg_set_source_rgba(ctx, 0.1f, 0.9f, 0.1f, 1.0f); + vkvg_move_to(ctx, 100, 100); + vkvg_rel_line_to(ctx, 50, 200); + vkvg_rel_line_to(ctx, 150, -100); + vkvg_rel_line_to(ctx, 100, 200); + vkvg_rel_line_to(ctx, -100, 100); + vkvg_rel_line_to(ctx, -10, -100); + vkvg_rel_line_to(ctx, -190, -50); + vkvg_close_path(ctx); + + vkvg_fill(ctx); + + vkvg_destroy(ctx); +} + +TEST(fill_with_hole_nz) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_line_width(ctx, 30); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_NON_ZERO); + + vkvg_set_source_rgba(ctx, 0.1f, 0.9f, 0.1f, 1.0f); + vkvg_move_to(ctx, 100, 100); + vkvg_rel_line_to(ctx, 200, 0); + vkvg_rel_line_to(ctx, 0, 150); + vkvg_rel_line_to(ctx, -200, 0); + vkvg_close_path(ctx); + + vkvg_move_to(ctx, 150, 150); + vkvg_rel_line_to(ctx, 0, 50); + vkvg_rel_line_to(ctx, 100, 0); + vkvg_rel_line_to(ctx, 0, -50); + vkvg_close_path(ctx); + + vkvg_fill(ctx); + + vkvg_destroy(ctx); +} +TEST(fill_with_hole_eo) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_line_width(ctx, 30); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); + + vkvg_set_source_rgba(ctx, 0.1f, 0.9f, 0.1f, 1.0f); + vkvg_move_to(ctx, 100, 100); + vkvg_rel_line_to(ctx, 200, 0); + vkvg_rel_line_to(ctx, 0, 150); + vkvg_rel_line_to(ctx, -200, 0); + vkvg_close_path(ctx); + + vkvg_move_to(ctx, 150, 150); + vkvg_rel_line_to(ctx, 0, 50); + vkvg_rel_line_to(ctx, 100, 0); + vkvg_rel_line_to(ctx, 0, -50); + vkvg_close_path(ctx); + + vkvg_fill(ctx); + + vkvg_destroy(ctx); +} diff --git a/samples/tests/gradient.cpp b/samples/tests/gradient.cpp new file mode 100644 index 0000000..33c0e6d --- /dev/null +++ b/samples/tests/gradient.cpp @@ -0,0 +1,161 @@ +#include "VkvgTest.hpp" + +VkvgPattern create_grad(VkvgContext ctx, float x) { + VkvgPattern pat = vkvg_pattern_create_linear(x, 0, 300, 0); + vkvg_pattern_add_color_stop(pat, 0, 1, 0, 0, 1); + vkvg_pattern_add_color_stop(pat, 0.5f, 0, 1, 0, 1); + vkvg_pattern_add_color_stop(pat, 1, 0, 0, 1, 1); + return pat; +} + +TEST(gradient_paint) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + // vkvg_translate(ctx,100,100); + VkvgPattern pat = create_grad(ctx, 0); + // vkvg_pattern_set_extend(pat,VKVG_EXTEND_NONE); + vkvg_rectangle(ctx, 0, 0, 400, 460); + vkvg_set_source(ctx, pat); + vkvg_pattern_destroy(pat); + vkvg_fill(ctx); + + float x = 100; + pat = create_grad(ctx, x); + // vkvg_pattern_set_extend(pat,VKVG_EXTEND_NONE); + vkvg_rectangle(ctx, x, 200, 50, 50); + vkvg_set_source(ctx, pat); + vkvg_pattern_destroy(pat); + vkvg_fill(ctx); + + x += 100; + + pat = vkvg_pattern_create_linear(10, 0, 300, 0); + vkvg_pattern_add_color_stop(pat, 0, 0, 0, 1, 0); + vkvg_pattern_add_color_stop(pat, 1, 1, 0, 0, 1); + // vkvg_pattern_set_extend(pat,VKVG_EXTEND_NONE); + vkvg_rectangle(ctx, 10, 10, 300, 50); + vkvg_set_source(ctx, pat); + vkvg_pattern_destroy(pat); + vkvg_fill(ctx); + + x += 200; + + pat = create_grad(ctx, x); + // vkvg_pattern_set_extend(pat,VKVG_EXTEND_NONE); + vkvg_rectangle(ctx, x, 200, 50, 50); + vkvg_set_source(ctx, pat); + vkvg_pattern_destroy(pat); + vkvg_fill(ctx); + + x += 100; + + pat = create_grad(ctx, x); + // vkvg_pattern_set_extend(pat,VKVG_EXTEND_NONE); + vkvg_rectangle(ctx, x, 200, 50, 50); + vkvg_set_source(ctx, pat); + vkvg_pattern_destroy(pat); + vkvg_fill(ctx); + + /*vkvg_set_source_rgb(ctx, 0,1,0); + vkvg_rectangle(ctx, 100,100,200,160); + vkvg_fill_preserve(ctx); + vkvg_set_source_rgb(ctx, 0,0,0); + vkvg_set_line_width(ctx,1.0f); + vkvg_stroke(ctx);*/ + + vkvg_destroy(ctx); +} + +TEST(gradient_paint_repeat) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + VkvgPattern pat = create_grad(ctx, 0); + vkvg_pattern_set_extend(pat, VKVG_EXTEND_REPEAT); + vkvg_set_source(ctx, pat); + vkvg_pattern_destroy(pat); + vkvg_paint(ctx); + + vkvg_destroy(ctx); +} + +TEST(gradient_test0) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + VkvgPattern pat = create_grad(ctx, 0); + vkvg_set_source(ctx, pat); + vkvg_rectangle(ctx, 100, 100, 200, 200); + vkvg_set_line_width(ctx, 20); + // vkvg_fill (ctx); + // vkvg_paint(ctx); + vkvg_stroke(ctx); + vkvg_pattern_destroy(pat); + + vkvg_destroy(ctx); +} +TEST(gradient_test1) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_source_rgb(ctx, 1, 0, 0); + vkvg_paint(ctx); + + VkvgPattern pat = vkvg_pattern_create_linear(100, 0, 300, 0); + vkvg_set_line_width(ctx, 20); + vkvg_pattern_add_color_stop(pat, 0, 1, 1, 1, 1); + vkvg_pattern_add_color_stop(pat, 1, 1, 1, 0, 0); + vkvg_set_source(ctx, pat); + vkvg_rectangle(ctx, 100, 100, 200, 200); + vkvg_fill(ctx); + // vkvg_stroke (ctx); + vkvg_pattern_destroy(pat); + + vkvg_destroy(ctx); +} + +TEST(gradient_transform) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + // vkvg_translate(ctx,-100,-100); + + vkvg_translate(ctx, 200, 100); + vkvg_rotate(ctx, 0.5f); + + // vkvg_scale(ctx,2,2); + VkvgPattern pat = vkvg_pattern_create_linear(0, 0, 400, 0); + vkvg_pattern_set_extend(pat, VKVG_EXTEND_NONE); + vkvg_set_line_width(ctx, 20); + vkvg_pattern_add_color_stop(pat, 0, 1, 0, 0, 1); + vkvg_pattern_add_color_stop(pat, 0.5f, 0, 1, 0, 1); + vkvg_pattern_add_color_stop(pat, 1, 0, 0, 1, 1); + vkvg_set_source(ctx, pat); + vkvg_rectangle(ctx, 0, 0, 400, 200); + // vkvg_fill (ctx); + vkvg_stroke(ctx); + // vkvg_paint(ctx); + vkvg_pattern_destroy(pat); + + vkvg_destroy(ctx); +} + +TEST(gradient_alpha) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_source_rgb(ctx, 0, 1, 0); + vkvg_paint(ctx); + + VkvgPattern pat = vkvg_pattern_create_linear(10, 0, 300, 0); + vkvg_pattern_add_color_stop(pat, 1, 1, 0, 0, 0.5); + vkvg_pattern_add_color_stop(pat, 1, 1, 0, 0, 0.5); + + vkvg_set_source(ctx, pat); + vkvg_pattern_destroy(pat); + vkvg_rectangle(ctx, 10, 10, 300, 200); + vkvg_fill(ctx); + + vkvg_destroy(ctx); +} + diff --git a/samples/tests/img_surf.cpp b/samples/tests/img_surf.cpp new file mode 100644 index 0000000..2b28907 --- /dev/null +++ b/samples/tests/img_surf.cpp @@ -0,0 +1,327 @@ + +#include "VkvgTest.hpp" + +TEST(img_paint) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror.jpg")); + + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + vkvg_paint(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(img_paint_offset) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror.jpg")); + vkvg_set_source_surface(ctx, imgSurf, 100, 100); + vkvg_paint(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(img_paint_with_scale) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror.jpg")); + + vkvg_scale(ctx, 0.2f, 0.2f); + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + + vkvg_paint(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(img_translate) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror.jpg")); + vkvg_translate(ctx, 150, 50); + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + + vkvg_paint(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(img_offset_and_scale) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror.jpg")); + vkvg_scale(ctx, 0.2f, 0.2f); + vkvg_set_source_surface(ctx, imgSurf, 100, 100); + + vkvg_paint(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} + +static float angle = 0; + +TEST(img_paint_with_rot) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror.jpg")); + + + angle += 0.005; + vkvg_clear(ctx); + + vkvg_rotate(ctx, angle); + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + + vkvg_paint(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(img_offset_and_rot) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror.jpg")); + angle += 0.005; + vkvg_clear(ctx); + + vkvg_rotate(ctx, angle); + vkvg_set_source_surface(ctx, imgSurf, 100, 100); + + vkvg_paint(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(img_offset_and_rot_center) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror2.png")); + angle += 0.005; + vkvg_clear(ctx); + + vkvg_translate(ctx, 142,142); + vkvg_rotate(ctx, angle); + vkvg_translate(ctx, -142,-142); + vkvg_set_source_surface(ctx, imgSurf, 100, 100); + + vkvg_paint(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(img_paint_pattern) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror2-64.png")); + VkvgPattern pat = vkvg_pattern_create_for_surface(imgSurf); + vkvg_set_source(ctx, pat); + vkvg_paint(ctx); + vkvg_pattern_destroy(pat); + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(img_paint_patt_repeat) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror.jpg")); + VkvgPattern pat = vkvg_pattern_create_for_surface(imgSurf); + vkvg_pattern_set_extend(pat, VKVG_EXTEND_REPEAT); + vkvg_set_source(ctx, pat); + vkvg_paint(ctx); + vkvg_pattern_destroy(pat); + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(img_paint_patt_repeat_scalled) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror.jpg")); + vkvg_scale(ctx, 0.2f, 0.2f); + VkvgPattern pat = vkvg_pattern_create_for_surface(imgSurf); + vkvg_pattern_set_extend(pat, VKVG_EXTEND_REPEAT); + vkvg_set_source(ctx, pat); + vkvg_paint(ctx); + vkvg_pattern_destroy(pat); + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(img_paint_patt_pad) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror2-64.png")); + VkvgPattern pat = vkvg_pattern_create_for_surface(imgSurf); + vkvg_pattern_set_extend(pat, VKVG_EXTEND_PAD); + vkvg_set_source(ctx, pat); + vkvg_paint(ctx); + vkvg_pattern_destroy(pat); + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +TEST(imgWithAlphaTest0) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("filled.png")); + + vkvg_set_source_surface(ctx, imgSurf, 40, 40); + vkvg_paint(ctx); + + vkvg_destroy(ctx); + vkvg_surface_destroy(imgSurf); +} +TEST(imgWithAlphaTest1) { + VkvgContext ctx = vkvg_create(test->surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(test->device, GET_PATH("mirror.jpg")); + VkvgSurface imgSurf2 = vkvg_surface_create_from_image(test->device, GET_PATH("filled.png")); + + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + vkvg_paint(ctx); + + vkvg_flush(ctx); + + vkvg_set_source_surface(ctx, imgSurf2, 50, 50); + vkvg_paint(ctx); + + vkvg_surface_destroy(imgSurf2); + vkvg_surface_destroy(imgSurf); + + vkvg_destroy(ctx); +} +/* +void test() { + VkvgContext ctx = vkvg_create(surf); + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); + VkvgSurface imgSurf = vkvg_surface_create_from_image(device, imgPath); + + vkvg_translate(ctx, 200, 200); + // vkvg_rotate(ctx,M_PI_4); + + vkvg_set_line_width(ctx, 20.f); + // vkvg_set_source_rgba(ctx,1,0,0,1); + vkvg_arc(ctx, 200, 200, 200, 0, 2.f * M_PIF); + vkvg_new_sub_path(ctx); + vkvg_arc(ctx, 200, 200, 100, 0, 2.f * M_PIF); + + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + vkvg_fill_preserve(ctx); + vkvg_set_source_rgba(ctx, 0.2f, 0.3f, 0.8f, 1); + + vkvg_stroke(ctx); + + vkvg_surface_destroy(imgSurf); + + vkvg_destroy(ctx); +} + +void imgTest() { + VkvgContext ctx = vkvg_create(surf); + vkvg_set_line_width(ctx, 1.0); // 设置线宽 + vkvg_set_line_cap(ctx, VKVG_LINE_CAP_ROUND); // 设置线条端点样式 + vkvg_set_line_join(ctx, VKVG_LINE_JOIN_ROUND); // 设置线条连接样式 + + VkvgSurface imgSurf = vkvg_surface_create_from_image(device, imgPath3); + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + vkvg_paint(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +void imgTest2() { + VkvgContext ctx = vkvg_create(surf); + vkvg_set_line_width(ctx, 10.0); // 设置线宽 + vkvg_set_line_cap(ctx, VKVG_LINE_CAP_ROUND); // 设置线条端点样式 + vkvg_set_line_join(ctx, VKVG_LINE_JOIN_ROUND); // 设置线条连接样式 + + VkvgSurface imgSurf = vkvg_surface_create_from_image(device, imgPath3); + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + + float arcSize = 70.f; + vkvg_translate(ctx, 20, 20); + + vkvg_arc(ctx, arcSize, arcSize, arcSize, 0, 2.f * M_PIF); + vkvg_fill_preserve(ctx); + vkvg_arc(ctx, arcSize, arcSize, arcSize, 0, 2.f * M_PIF); + vkvg_set_source_rgba(ctx,0.4f,0.4f,0.9f,1); + + vkvg_stroke(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_destroy(ctx); +} +void imgTestClipped() { + VkvgContext ctx = vkvg_create(surf); + + vkvg_set_line_width(ctx, 10.0); // 设置线宽 + vkvg_set_line_cap(ctx, VKVG_LINE_CAP_ROUND); // 设置线条端点样式 + vkvg_set_line_join(ctx, VKVG_LINE_JOIN_ROUND); // 设置线条连接样式 + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); // 设置线条连接样式 + + vkvg_set_source_rgba(ctx,0,0,0,1); + vkvg_paint(ctx);//black background, or png will be transparent + + + VkvgSurface imgSurf = vkvg_surface_create_from_image(device, imgPath3); + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + + float arcSize = 70.f; + + vkvg_arc(ctx, arcSize, arcSize, 71.f, 0, 2.f * M_PIF); + vkvg_clip_preserve(ctx); + + vkvg_fill(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_reset_clip(ctx); + vkvg_destroy(ctx); +} +void imgTest3() { + VkvgContext ctx = vkvg_create(surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(device, imgPath); + VkvgSurface imgSurf2 = vkvg_surface_create_from_image(device, imgPath3); + vkvg_set_operator(ctx, VKVG_OPERATOR_OVER); + + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + vkvg_paint(ctx); + vkvg_set_operator(ctx, VKVG_OPERATOR_OVER); + //vkvg_set_source_rgba(ctx, 1.0, 1.0, 1.0, 0.4); + vkvg_set_source_surface(ctx, imgSurf2, 40, 40); + vkvg_paint(ctx); + + vkvg_arc(ctx, 200, 200, 41.f, 0, M_PIF * 2); + vkvg_fill_preserve(ctx); + vkvg_destroy(ctx); + + vkvg_surface_destroy(imgSurf); + vkvg_surface_destroy(imgSurf2); + + //vkvg_surface_write_to_png(surface, "imgTest3.png"); + + //vkvg_surface_destroy(surface); +} + + +void imgTest4() { + VkvgContext ctx = vkvg_create(surf); + VkvgSurface imgSurf = vkvg_surface_create_from_image(device, imgPath); + VkvgSurface imgSurf2 = vkvg_surface_create_from_image(device, imgPath3); + + vkvg_set_operator(ctx, VKVG_OPERATOR_OVER); + + vkvg_set_source_surface(ctx, imgSurf, 0, 0); + vkvg_paint(ctx); + + float arcSize = 70.f; + + //vkvg_set_operator(ctx, VKVG_OPERATOR_OVER); + //vkvg_set_source_rgba(ctx, 1.0, 1.0, 1.0, 0.4); + + vkvg_set_source_surface(ctx, imgSurf2, 50, 50); + //vkvg_arc(ctx, arcSize, arcSize, 60.f, 0, 2.f * M_PIF); + vkvg_rectangle(ctx,50,50,120,120); + vkvg_paint(ctx); + + vkvg_set_source_rgba(ctx, 1.0f, 0.0f, 0.0f, 0.9f); + vkvg_arc(ctx, 200, 200, 21.f, 0, M_PIF * 2); + vkvg_fill(ctx); + + + + //vkvg_set_line_width(ctx, 1); + + + vkvg_surface_destroy(imgSurf2); + vkvg_surface_destroy(imgSurf); + + vkvg_destroy(ctx); + + //vkvg_surface_write_to_png(surf, "imgTest4.png"); +}*/ + diff --git a/samples/tests/line_caps.cpp b/samples/tests/line_caps.cpp new file mode 100644 index 0000000..6938437 --- /dev/null +++ b/samples/tests/line_caps.cpp @@ -0,0 +1,53 @@ +#include "VkvgTest.hpp" + +TEST(line_caps0) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_set_source_rgba(ctx, 0.9f, 0.9f, 0.9f, 1); + vkvg_paint(ctx); + + float x = 20, y = 20, dx = 40, dy = 60; + + // vkvg_scale(ctx,5,5); + vkvg_set_line_width(ctx, 30); + vkvg_set_source_rgba(ctx, 0.0, 0.0, 0, 1); + vkvg_move_to(ctx, x, y); + vkvg_rel_line_to(ctx, 0, dy); + vkvg_stroke(ctx); + vkvg_set_line_cap(ctx, VKVG_LINE_CAP_SQUARE); + vkvg_move_to(ctx, x + dx, y); + vkvg_rel_line_to(ctx, 0, dy); + vkvg_stroke(ctx); + vkvg_set_line_cap(ctx, VKVG_LINE_CAP_ROUND); + vkvg_move_to(ctx, x + 2 * dx, y); + vkvg_rel_line_to(ctx, 0, dy); + vkvg_rel_move_to(ctx, dx, -dy); + vkvg_rel_line_to(ctx, dx, dy); + vkvg_rel_move_to(ctx, dx, -dy / 2.f); + vkvg_rel_line_to(ctx, dx, 0); + vkvg_rel_move_to(ctx, dx, dy / 2.f); + vkvg_rel_line_to(ctx, dx, -dy); + vkvg_rel_move_to(ctx, dx, dy); + vkvg_rel_line_to(ctx, 0, -dy); + vkvg_rel_move_to(ctx, dx * 2.f, dy); + vkvg_rel_line_to(ctx, -dx, -dy); + vkvg_rel_move_to(ctx, dx * 3.f, dy / 2.f); + vkvg_rel_line_to(ctx, -dx, 0); + // vkvg_rel_line_to(ctx,0,-dy); + // vkvg_rel_move_to(ctx,dx,dy/2); + // vkvg_rel_line_to(ctx,dx,0); + vkvg_stroke(ctx); + + vkvg_set_line_cap(ctx, VKVG_LINE_CAP_BUTT); + vkvg_set_line_width(ctx, 1); + vkvg_set_source_rgba(ctx, 1, 0, 0, 1); + vkvg_move_to(ctx, x, y); + vkvg_rel_line_to(ctx, 0, dy); + vkvg_rel_move_to(ctx, dx, -dy); + vkvg_rel_line_to(ctx, 0, dy); + vkvg_rel_move_to(ctx, dx, -dy); + vkvg_rel_line_to(ctx, 0, dy); + vkvg_stroke(ctx); + + vkvg_destroy(ctx); +} + diff --git a/samples/tests/line_join.cpp b/samples/tests/line_join.cpp new file mode 100644 index 0000000..d6c400a --- /dev/null +++ b/samples/tests/line_join.cpp @@ -0,0 +1,173 @@ +#include "VkvgTest.hpp" + +TEST(line_join0) { + VkvgContext ctx = vkvg_create(test->surf); + + float x = 250, y = 150; + + // vkvg_scale(ctx,2,2); + + vkvg_set_line_width(ctx, 100); + vkvg_set_source_rgba(ctx, 0, 1, 0, 1); + + vkvg_set_line_join(ctx, VKVG_LINE_JOIN_ROUND); + // vkvg_rectangle(ctx,x,y,dx,dy); + + vkvg_move_to(ctx, x, y); + vkvg_rel_line_to(ctx, -50, 30); + vkvg_rel_line_to(ctx, 0, 60); + vkvg_rel_line_to(ctx, 50, 30); + /* + vkvg_rel_line_to(ctx,50,-30); + vkvg_rel_line_to(ctx,50,0); + vkvg_rel_line_to(ctx,50,30); + vkvg_rel_line_to(ctx,0,60); + vkvg_rel_line_to(ctx,-50,70); + vkvg_rel_line_to(ctx,-50,0); + vkvg_rel_line_to(ctx,-50,-70); + vkvg_close_path(ctx); + vkvg_stroke(ctx); + + vkvg_set_source_rgba(ctx,1,0,0,1); + vkvg_move_to(ctx,x+200,y); + vkvg_rel_line_to(ctx,50,70); + vkvg_rel_line_to(ctx,50,0); + vkvg_rel_line_to(ctx,50,-70); + vkvg_rel_line_to(ctx,0,-60); + vkvg_rel_line_to(ctx,-50,-30); + vkvg_rel_line_to(ctx,-50,0); + vkvg_rel_line_to(ctx,-50,30);*/ + vkvg_close_path(ctx); + vkvg_stroke(ctx); + + vkvg_set_source_rgba(ctx, 0, 0, 1, 1); + vkvg_move_to(ctx, x + 250, y); + vkvg_rel_line_to(ctx, 50, -30); + vkvg_rel_line_to(ctx, 50, 0); + vkvg_rel_line_to(ctx, 50, 30); + vkvg_rel_line_to(ctx, 0, 60); + vkvg_rel_line_to(ctx, -50, 70); + vkvg_rel_line_to(ctx, -50, 0); + vkvg_rel_line_to(ctx, -50, -70); + vkvg_close_path(ctx); + vkvg_stroke(ctx); + + // float dx = 150, dy = 140; + // vkvg_rel_line_to(ctx,dx,-dy); + // vkvg_rel_line_to(ctx,dx,dy); + // vkvg_stroke(ctx); + // vkvg_set_line_join(ctx,VKVG_LINE_JOIN_BEVEL); + // vkvg_rel_move_to(ctx,-dx*2,abs(dy*1.5)); + // vkvg_rel_line_to(ctx,dx,-dy); + // vkvg_rel_line_to(ctx,dx,dy); + // vkvg_stroke(ctx); + // vkvg_set_line_join(ctx,VKVG_LINE_JOIN_ROUND); + // vkvg_rel_move_to(ctx,-dx*2,abs(dy*1.5)); + // vkvg_rel_line_to(ctx,dx,-dy); + // vkvg_rel_line_to(ctx,dx,dy); + // vkvg_stroke(ctx); + // vkvg_set_line_join(ctx,VKVG_LINE_JOIN_MITER); + + vkvg_destroy(ctx); +} + +TEST(line_join1) { + VkvgContext ctx = vkvg_create(test->surf); + + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); + vkvg_set_line_width(ctx, 30); + + vkvg_set_line_join(ctx, VKVG_LINE_JOIN_ROUND); + + // vkvg_arc (ctx, 200, 500, 100, 0, M_PI); + + vkvg_translate(ctx, -50, -50); + + vkvg_set_source_rgb(ctx, 0.5, 0, 0); + + for (int j = 0; j < 2; j++) { + int i = 0; + vkvg_move_to(ctx, 100, 100); + for (i = 0; i < 5; i++) { + vkvg_rel_line_to(ctx, 70, 50); + vkvg_rel_line_to(ctx, -70, 50); + } + vkvg_stroke(ctx); + + vkvg_move_to(ctx, 200, 600); + for (i = 0; i < 5; i++) { + vkvg_rel_line_to(ctx, 70, -50); + vkvg_rel_line_to(ctx, -70, -50); + } + vkvg_stroke(ctx); + + vkvg_move_to(ctx, 400, 100); + for (i = 0; i < 5; i++) { + vkvg_rel_line_to(ctx, -70, 50); + vkvg_rel_line_to(ctx, 70, 50); + } + vkvg_stroke(ctx); + + vkvg_move_to(ctx, 500, 600); + for (i = 0; i < 5; i++) { + vkvg_rel_line_to(ctx, -70, -50); + vkvg_rel_line_to(ctx, 70, -50); + } + vkvg_stroke(ctx); + vkvg_set_line_join(ctx, VKVG_LINE_JOIN_BEVEL); + vkvg_translate(ctx, 500, 0); + } + + vkvg_destroy(ctx); +} + +TEST(line_join2) { + VkvgContext ctx = vkvg_create(test->surf); + + vkvg_set_fill_rule(ctx, VKVG_FILL_RULE_EVEN_ODD); + vkvg_set_line_width(ctx, 30); + + vkvg_set_line_join(ctx, VKVG_LINE_JOIN_ROUND); + + // vkvg_arc (ctx, 200, 500, 100, 0, M_PI); + + vkvg_translate(ctx, -50, -50); + + vkvg_set_source_rgb(ctx, 0.5, 0, 0); + + for (int j = 0; j < 2; j++) { + int i = 0; + vkvg_move_to(ctx, 100, 100); + for (i = 0; i < 4; i++) { + vkvg_rel_line_to(ctx, 50, 70); + vkvg_rel_line_to(ctx, 50, -70); + } + vkvg_stroke(ctx); + + vkvg_move_to(ctx, 500, 200); + for (i = 0; i < 4; i++) { + vkvg_rel_line_to(ctx, -50, 70); + vkvg_rel_line_to(ctx, -50, -70); + } + vkvg_stroke(ctx); + + vkvg_move_to(ctx, 100, 400); + for (i = 0; i < 4; i++) { + vkvg_rel_line_to(ctx, 50, -70); + vkvg_rel_line_to(ctx, 50, 70); + } + vkvg_stroke(ctx); + + vkvg_move_to(ctx, 500, 500); + for (i = 0; i < 4; i++) { + vkvg_rel_line_to(ctx, -50, -70); + vkvg_rel_line_to(ctx, -50, 70); + } + vkvg_stroke(ctx); + vkvg_set_line_join(ctx, VKVG_LINE_JOIN_BEVEL); + vkvg_translate(ctx, 450, 0); + } + + vkvg_destroy(ctx); +} + diff --git a/samples/tests/lines.cpp b/samples/tests/lines.cpp new file mode 100644 index 0000000..624b290 --- /dev/null +++ b/samples/tests/lines.cpp @@ -0,0 +1,103 @@ +#include "VkvgTest.hpp" + +TEST(lines_horizontal) { + float w = (float)test->app->width; + float h = (float)test->app->height; + + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + for (uint32_t i = 0; i < test->app->testSize; i++) { + randomize_color(ctx); + float x1 = w * rndf(); + float y1 = h * rndf(); + float v = 500.f * rndf(); + + vkvg_move_to(ctx, x1, y1); + vkvg_line_to(ctx, x1 + v, y1); + vkvg_stroke(ctx); + } + vkvg_destroy(ctx); +} +TEST(lines_vertical) { + float w = (float)test->app->width; + float h = (float)test->app->height; + + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + for (uint32_t i = 0; i < test->app->testSize; i++) { + randomize_color(ctx); + float x1 = w * rndf(); + float y1 = h * rndf(); + float v = 500.f * rndf(); + + vkvg_move_to(ctx, x1, y1); + vkvg_line_to(ctx, x1, y1 + v); + vkvg_stroke(ctx); + } + vkvg_destroy(ctx); +} +TEST(lines_horzAndVert) { + float w = (float)test->app->width; + float h = (float)test->app->height; + + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + for (uint32_t i = 0; i < test->app->testSize; i++) { + randomize_color(ctx); + + float x1 = w * rndf(); + float y1 = h * rndf(); + float x2 = (w * rndf()) + 1; + float y2 = (h * rndf()) + 1; + + vkvg_move_to(ctx, x1, y1); + vkvg_line_to(ctx, x2, y2); + vkvg_stroke(ctx); + } + vkvg_destroy(ctx); +} +TEST(lines_multilines) { + float w = (float)test->app->width; + float h = (float)test->app->height; + + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + randomize_color(ctx); + + for (uint32_t i = 0; i < test->app->testSize; i++) { + + float x1 = w * rndf(); + float y1 = h * rndf(); + float x2 = (w * rndf()) + 1; + float y2 = (h * rndf()) + 1; + + vkvg_move_to(ctx, x1, y1); + vkvg_line_to(ctx, x2, y2); + } + vkvg_stroke(ctx); + vkvg_destroy(ctx); +} +TEST(lines_multi_segments) { + float w = (float)test->app->width; + float h = (float)test->app->height; + + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + randomize_color(ctx); + float x1 = w * rndf(); + float y1 = h * rndf(); + vkvg_move_to(ctx, x1, y1); + + for (uint32_t i = 0; i < test->app->testSize; i++) { + x1 = w * rndf(); + y1 = h * rndf(); + vkvg_line_to(ctx, x1, y1); + } + vkvg_stroke(ctx); + vkvg_destroy(ctx); +} diff --git a/samples/tests/paint_surf.cpp b/samples/tests/paint_surf.cpp new file mode 100644 index 0000000..5d42f66 --- /dev/null +++ b/samples/tests/paint_surf.cpp @@ -0,0 +1,103 @@ +#include "VkvgTest.hpp" + +float lineWidth = 10.f; + +VkvgSurface createSurf(VkvgDevice dev, uint32_t width, uint32_t height) { + VkvgSurface s = vkvg_surface_create(dev, width, height); + VkvgContext ctx = vkvg_create(s); + vkvg_set_line_width(ctx, lineWidth); + float hlw = lineWidth / 2.f; + /* + vkvg_set_source_rgba(ctx,0,1,0,0.5); + vkvg_fill_preserve(ctx);*/ + vkvg_set_source_rgba(ctx, 1, 0, 0, 0.5); + vkvg_paint(ctx); + vkvg_set_source_rgba(ctx, 0, 0, 1, 0.5); + vkvg_rectangle(ctx, hlw, hlw, (float)width - lineWidth, (float)height - lineWidth); + vkvg_stroke(ctx); + vkvg_destroy(ctx); + return s; +} + +TEST(paint_surf) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + VkvgSurface src = createSurf(test->device, 256, 256); + vkvg_set_source_surface(ctx, src, 0, 0); + vkvg_paint(ctx); + vkvg_destroy(ctx); + vkvg_surface_destroy(src); +} + +TEST(paint_surf_with_offset) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + VkvgSurface src = createSurf(test->device, 256, 256); + vkvg_set_source_rgba(ctx, 0, 1, 0, 0.5); + vkvg_paint(ctx); + vkvg_set_source_surface(ctx, src, 100, 100); + vkvg_paint(ctx); + vkvg_destroy(ctx); + vkvg_surface_destroy(src); +} +TEST(paint_surf_multiple) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + VkvgSurface src = createSurf(test->device, 256, 256); + for (int i = 0; i < 10; i++) { + vkvg_set_source_surface(ctx, src, i * 20, i * 20); + vkvg_paint(ctx); + } + vkvg_destroy(ctx); + vkvg_surface_destroy(src); +} +TEST(paint_surf_with_rotation) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + VkvgSurface src = createSurf(test->device, 256, 256); + vkvg_set_source_surface(ctx, src, 0, 0); + vkvg_rotate(ctx, 45); + vkvg_paint(ctx); + vkvg_destroy(ctx); + vkvg_surface_destroy(src); +} +TEST(paint_surf_with_scale) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + VkvgSurface src = createSurf(test->device, 256, 256); + vkvg_set_source_surface(ctx, src, 0, 0); + vkvg_scale(ctx, 0.2f, 0.2f); + vkvg_paint(ctx); + vkvg_destroy(ctx); + vkvg_surface_destroy(src); +} +TEST(paint_rect) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + VkvgSurface src = createSurf(test->device, 256, 256); + vkvg_set_source_surface(ctx, src, 0, 0); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_paint(ctx); + vkvg_destroy(ctx); + vkvg_surface_destroy(src); +} +// TODO:test failed: full screen paint instead of rotated rect +TEST(paint_rect_with_rotation) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_rotate(ctx, 45); + vkvg_set_source_rgba(ctx, 1, 0, 0, 1); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_paint(ctx); + vkvg_destroy(ctx); +} +TEST(paint_rect_with_scale) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_scale(ctx, 0.2f, 0.2f); + vkvg_set_source_rgba(ctx, 1, 0, 0, 1); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_paint(ctx); + vkvg_destroy(ctx); +} diff --git a/samples/tests/randoms.cpp b/samples/tests/randoms.cpp new file mode 100644 index 0000000..40a622d --- /dev/null +++ b/samples/tests/randoms.cpp @@ -0,0 +1,59 @@ +#include "VkvgTest.hpp" + + +static float shape_size = 0.2f; + +void _shape_fill(VkvgTest* test, shape_t shape) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + for (uint32_t i = 0; i < test->app->testSize; i++) { + test->draw_random_shape(ctx, shape, shape_size); + vkvg_fill(ctx); + } + vkvg_destroy(ctx); +} +void _shape_stroke(VkvgTest* test, shape_t shape) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + for (uint32_t i = 0; i < test->app->testSize; i++) { + test->draw_random_shape(ctx, shape, shape_size); + vkvg_stroke(ctx); + } + vkvg_destroy(ctx); +} +void _shape_fill_stroke(VkvgTest* test, shape_t shape) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + for (uint32_t i = 0; i < test->app->testSize; i++) { + test->draw_random_shape(ctx, shape, shape_size); + vkvg_fill_preserve(ctx); + vkvg_stroke(ctx); + } + vkvg_destroy(ctx); +} + +TEST(rnd_rectangles_fill) { _shape_fill(test, SHAPE_RECTANGLE); } +TEST(rnd_rectangles_stroke) { _shape_stroke(test, SHAPE_RECTANGLE); } +TEST(rnd_rectangles_fill_stroke) { _shape_fill_stroke(test, SHAPE_RECTANGLE); } +TEST(rnd_rounded_rects_fill) { _shape_fill(test, SHAPE_ROUNDED_RECTANGLE); } +TEST(rnd_rounded_rects_stroke) { _shape_stroke(test, SHAPE_ROUNDED_RECTANGLE); } +TEST(rnd_rounded_rects_fill_stroke) { _shape_fill_stroke(test, SHAPE_ROUNDED_RECTANGLE); } +TEST(rnd_circles_fill) { _shape_fill(test, SHAPE_CIRCLE); } +TEST(rnd_circles_stroke) { _shape_stroke(test, SHAPE_CIRCLE); } +TEST(rnd_circles_fill_stroke) { _shape_fill_stroke(test, SHAPE_CIRCLE); } +TEST(rnd_stars_fill) { _shape_fill(test, SHAPE_STAR); } +TEST(rnd_stars_stroke) { _shape_stroke(test, SHAPE_STAR); } +TEST(rnd_stars_fill_stroke) { _shape_fill_stroke(test, SHAPE_STAR); } +TEST(rnd_random_fill) { _shape_fill(test, SHAPE_RANDOM); } +TEST(rnd_random_stroke) { _shape_stroke(test, SHAPE_RANDOM); } +TEST(rnd_random_fill_stroke) { _shape_fill_stroke(test, SHAPE_RANDOM); } + +TEST(rnd_fixed_size_square_fill) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + for (uint32_t i = 0; i < test->app->testSize; i++) { + test->draw_random_square(ctx, 50.0f); + vkvg_fill(ctx); + } + vkvg_destroy(ctx); +} diff --git a/samples/tests/simple_paint.cpp b/samples/tests/simple_paint.cpp new file mode 100644 index 0000000..a1f1ca0 --- /dev/null +++ b/samples/tests/simple_paint.cpp @@ -0,0 +1,52 @@ +#include "VkvgTest.hpp" + +TEST(paint) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_set_source_rgba(ctx, 1, 0, 0, 0.5f); + vkvg_paint(ctx); + vkvg_destroy(ctx); +} +TEST(paint_with_rotation) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_rotate(ctx, 45); + vkvg_set_source_rgba(ctx, 1, 0, 0, 1); + vkvg_paint(ctx); + vkvg_destroy(ctx); +} +TEST(paint_with_scale) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_scale(ctx, 0.2f, 0.2f); + vkvg_set_source_rgba(ctx, 1, 0, 0, 1); + vkvg_paint(ctx); + vkvg_destroy(ctx); +} +TEST(paint_rect) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_set_source_rgba(ctx, 1, 0, 0, 1); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_paint(ctx); + vkvg_destroy(ctx); +} +// TODO:test failed: full screen paint instead of rotated rect +TEST(paint_rect_with_rotation) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_rotate(ctx, 45); + vkvg_set_source_rgba(ctx, 1, 0, 0, 1); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_paint(ctx); + vkvg_destroy(ctx); +} +TEST(paint_rect_with_scale) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + vkvg_scale(ctx, 0.2f, 0.2f); + vkvg_set_source_rgba(ctx, 1, 0, 0, 1); + vkvg_rectangle(ctx, 100, 100, 300, 200); + vkvg_paint(ctx); + vkvg_destroy(ctx); +} diff --git a/samples/tests/text.cpp b/samples/tests/text.cpp new file mode 100644 index 0000000..0f151ca --- /dev/null +++ b/samples/tests/text.cpp @@ -0,0 +1,284 @@ +#include "VkvgTest.hpp" + +static const char *txt = "The quick brown fox jumps over the lazy dog"; + +void print(VkvgContext ctx, float penY, uint32_t size) { + vkvg_set_font_size(ctx, size); + vkvg_move_to(ctx, 10, penY); + vkvg_show_text(ctx, txt); +} +void print_boxed(VkvgContext ctx, const char *text, float penX, float penY, uint32_t size) { + vkvg_set_font_size(ctx, size); + vkvg_text_extents_t te = {0}; + vkvg_text_extents(ctx, text, &te); + vkvg_font_extents_t fe = {0}; + vkvg_font_extents(ctx, &fe); + + vkvg_move_to(ctx, penX, penY); + vkvg_rectangle(ctx, penX, penY - fe.ascent, te.width, fe.height); + vkvg_set_source_rgb(ctx, 0.2f, 0.2f, 0.7f); + vkvg_fill(ctx); + + vkvg_move_to(ctx, penX, penY); + vkvg_set_source_rgb(ctx, 1, 1, 1); + vkvg_show_text(ctx, text); +} +void print_unboxed(VkvgContext ctx, const char *text, float penX, float penY, uint32_t size) { + vkvg_set_font_size(ctx, size); + vkvg_move_to(ctx, penX, penY); + vkvg_set_source_rgb(ctx, 1, 1, 1); + vkvg_show_text(ctx, text); +} +TEST(text2) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_color_t bg = {0.0, 0.0, 0.0, 1}; + vkvg_color_t fg = {1.0f, 1.0f, 1.0f, 1}; + + vkvg_set_source_rgba(ctx, bg.r, bg.g, bg.b, bg.a); + vkvg_paint(ctx); + vkvg_set_source_rgba(ctx, fg.r, fg.g, fg.b, fg.a); + // vkvg_select_font_face(ctx, "droid"); + vkvg_select_font_face(ctx, "times"); + + float penY = 10.f; + + for (uint32_t size = 4; size < 39; size++) { + print(ctx, (float)penY, size); + penY += size; + } + + vkvg_destroy(ctx); +} +TEST(text1) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_color_t fg = {0.0, 0.0, 0.0, 1}; + vkvg_color_t bg = {0.9f, 0.9f, 0.9f, 1}; + + vkvg_set_source_rgba(ctx, bg.r, bg.g, bg.b, bg.a); + vkvg_paint(ctx); + vkvg_set_source_rgba(ctx, fg.r, fg.g, fg.b, fg.a); + + uint32_t size = 8; + float penY = 100.f; + + vkvg_set_font_size(ctx, size); + + vkvg_select_font_face(ctx, "mono"); + vkvg_move_to(ctx, 100.f, penY); + vkvg_show_text(ctx, txt); + + penY += 1.2f * size; + + vkvg_select_font_face(ctx, "times"); + vkvg_move_to(ctx, 100.f, penY); + vkvg_show_text(ctx, txt); + + penY += 1.2f * size; + + vkvg_select_font_face(ctx, "arial:italic"); + vkvg_move_to(ctx, 100.f, penY); + vkvg_show_text(ctx, txt); + + vkvg_destroy(ctx); +} +TEST(text_test) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + // vkvg_color_t fg = {0.2,0.2,0.2,1}; + vkvg_color_t fg = {0.0, 0.0, 0.0, 1}; + vkvg_color_t bg = {1.0f, 1.0f, 1.0f, 1}; + vkvg_set_source_rgba(ctx, bg.r, bg.g, bg.b, bg.a); + vkvg_paint(ctx); + + float size = 19; + float penY = 50; + float penX = 10; + + /*vkvg_rectangle(ctx,30,0,100,400); + vkvg_clip(ctx);*/ + + // vkvg_select_font_face(ctx, "/usr/local/share/fonts/DroidSansMono.ttf"); + // vkvg_select_font_face(ctx, "/usr/share/fonts/truetype/unifont/unifont.ttf"); + + vkvg_set_font_size(ctx, 12); + vkvg_select_font_face(ctx, "droid"); + vkvg_font_extents_t fe; + vkvg_font_extents(ctx, &fe); + vkvg_move_to(ctx, penX, penY); + vkvg_set_source_rgba(ctx, fg.r, fg.g, fg.b, fg.a); + vkvg_text_extents_t te; + vkvg_text_extents(ctx, "abcdefghijk", &te); + vkvg_show_text(ctx, "abcdefghijk"); + penX += te.x_advance; + vkvg_move_to(ctx, penX, penY); + vkvg_show_text(ctx, "*abcdefghijk2"); + penY += 2.f * size; + + vkvg_select_font_face(ctx, "times"); + vkvg_move_to(ctx, penX, penY); + vkvg_show_text(ctx, "abcdefghijklmnopqrstuvwxyz"); + penY += size; + + vkvg_select_font_face(ctx, "droid"); + vkvg_move_to(ctx, penX, penY); + vkvg_show_text(ctx, "lmnopqrstuvwxyz123456789"); + penY += size; + + vkvg_select_font_face(ctx, "times:bold"); + vkvg_move_to(ctx, penX, penY); + vkvg_show_text(ctx, "abcdefghijklmnopqrstuvwxyz"); + penY += size; + + vkvg_select_font_face(ctx, "droid"); + vkvg_move_to(ctx, penX, penY); + vkvg_show_text(ctx, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + penY += size; + + vkvg_select_font_face(ctx, "arial:italic"); + vkvg_move_to(ctx, penX, penY); + vkvg_show_text(ctx, "abcdefghijklmnopqrstuvwxyz"); + penY += size; + + vkvg_select_font_face(ctx, "arial"); + vkvg_move_to(ctx, penX, penY); + vkvg_show_text(ctx, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + penY += size; + vkvg_move_to(ctx, penX, penY); + vkvg_show_text(ctx, "this is a test"); + penY += size; + vkvg_move_to(ctx, penX, penY); + vkvg_show_text(ctx, "this is another test to see if label is working"); + penY += size; + + vkvg_select_font_face(ctx, "mono"); + vkvg_move_to(ctx, penX, penY); + vkvg_show_text(ctx, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + penY += size; + + vkvg_move_to(ctx, 80, 400); + vkvg_show_text(ctx, "Ленивый рыжий кот"); + + vkvg_move_to(ctx, 150, 250); + vkvg_show_text(ctx, "test string é€"); + vkvg_move_to(ctx, 150, 300); + vkvg_show_text(ctx, "كسول الزنجبيل القط"); + vkvg_move_to(ctx, 150, 350); + vkvg_show_text(ctx, "懶惰的姜貓"); + + // vkvg_show_text (ctx,"ABCDABCD"); + // vkvg_show_text (ctx,"j"); + + vkvg_destroy(ctx); +} +TEST(text_single_font_and_size) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + float w = (float)test->app->width; + float h = (float)test->app->height; + + for (uint32_t i = 0; i < test->app->testSize; i++) { + randomize_color(ctx); + float x = rndf() * w; + float y = rndf() * h; + vkvg_select_font_face(ctx, "mono"); + vkvg_set_font_size(ctx, 20); + vkvg_move_to(ctx, x, y); + vkvg_show_text(ctx, "This is a test string!"); + } + vkvg_destroy(ctx); +} +TEST(text_simple) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_source_rgb(ctx, 0, 0, 0); + vkvg_paint(ctx); + vkvg_set_source_rgb(ctx, 1, 1, 1); + + vkvg_load_font_from_path(ctx, "data/DancingScript-Regular.ttf", "dancing"); + print_boxed(ctx, "abcdefghijklmnopqrstuvwxyz", 20, 60, 20); + print_boxed(ctx, "ABC", 20, 160, 60); + vkvg_select_font_face(ctx, "mono"); + print_boxed(ctx, "This is a test string!", 20, 250, 20); + print_boxed(ctx, "ANOTHER ONE TO CHECK..", 20, 350, 20); + + vkvg_destroy(ctx); +} +TEST(text_font_file_path) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_source_rgb(ctx, 0, 0, 0); + vkvg_paint(ctx); + vkvg_set_source_rgb(ctx, 1, 1, 1); + vkvg_load_font_from_path(ctx, "data/DancingScript-Regular.ttf", "droid"); + print_boxed(ctx, "This is a test string!", 50, 20, 12); + print_boxed(ctx, "This is a test string!", 50, 50, 20); + print_boxed(ctx, "ANOTHER ONE TO CHECK..", 50, 80, 20); + print_boxed(ctx, "this is another string to check if ligature are well set", 10, 120, 20); + vkvg_destroy(ctx); +} + +TEST(text_random_size) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + float w = (float)test->app->width; + float h = (float)test->app->height; + + vkvg_select_font_face(ctx, "mono"); + for (uint32_t i = 0; i < test->app->testSize; i++) { + randomize_color(ctx); + float x = rndf() * w; + float y = rndf() * h; + uint32_t c = (uint32_t)(rndf() * 120) + 1; + + vkvg_set_font_size(ctx, c); + vkvg_move_to(ctx, x, y); + vkvg_show_text(ctx, "This is a test string!"); + } + vkvg_destroy(ctx); +} + +const char *const fonts[] = {"mono", "droid", "times", "arial", "times:bold"}; + +TEST(text_random_font_and_size) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + float w = (float)test->app->width; + float h = (float)test->app->height; + + for (uint32_t i = 0; i < test->app->testSize; i++) { + randomize_color(ctx); + float x = rndf() * w; + float y = rndf() * h; + uint32_t c = (uint32_t)(rndf() * 80) + 1; + uint32_t f = (uint32_t)(rndf() * 4); + + vkvg_set_font_size(ctx, c); + vkvg_select_font_face(ctx, fonts[f]); + vkvg_move_to(ctx, x, y); + vkvg_show_text(ctx, "This is a test string!"); + } + vkvg_destroy(ctx); +} +TEST(text_proto_sinaitic) { + VkvgContext ctx = vkvg_create(test->surf); + vkvg_clear(ctx); + + vkvg_set_source_rgb(ctx, 0, 0, 0); + vkvg_paint(ctx); + vkvg_set_source_rgb(ctx, 1, 1, 1); + + vkvg_load_font_from_path(ctx, "data/Proto-Sinaitic15.ttf", "sinaitic"); + print_boxed(ctx, "hwhy", 100, 150, 60); + + vkvg_destroy(ctx); +} diff --git a/src/vkvg_context_internal.h b/src/vkvg_context_internal.h index fa9a06d..0d6976b 100644 --- a/src/vkvg_context_internal.h +++ b/src/vkvg_context_internal.h @@ -103,9 +103,9 @@ typedef struct _vkvg_context_save_t { float lineWidth; float miterLimit; - uint32_t dashCount; // value count in dash array, 0 if dash not set. float dashOffset; // an offset for dash float *dashes; // an array of alternate lengths of on and off stroke. + uint32_t dashCount; // value count in dash array, 0 if dash not set. vkvg_operator_t curOperator; vkvg_line_cap_t lineCap; diff --git a/tests/common/test.c b/tests/common/test.c index 42721f8..c6c1644 100644 --- a/tests/common/test.c +++ b/tests/common/test.c @@ -698,8 +698,8 @@ VkvgContext _initCtx() { const int star_points[11][2] = {{0, 85}, {75, 75}, {100, 10}, {125, 75}, {200, 85}, {150, 125}, {160, 190}, {100, 150}, {40, 190}, {50, 125}, {0, 85}}; -void randomize_color(VkvgContext ctx) { vkvg_set_source_rgba(ctx, rndf(), rndf(), rndf(), rndf()); } -void draw_random_shape(VkvgContext ctx, shape_t shape, float sizeFact) { +void randomize_color(VkvgContext ctx) { vkvg_set_source_rgba(ctx, rndf(), rndf(), rndf(), rndf()); } +void draw_random_shape(VkvgContext ctx, shape_t shape, float sizeFact) { float w = (float)test_width; float h = (float)test_height; diff --git a/tests/common/test.h b/tests/common/test.h index 8079cec..ae996fa 100644 --- a/tests/common/test.h +++ b/tests/common/test.h @@ -1,3 +1,4 @@ +#include "vkvg.h" #include "vkengine.h" #include #include @@ -6,7 +7,6 @@ #include #include "rnd.h" -#include "vkvg.h" #include "vkh_device.h" #include "vkh_presenter.h" diff --git a/tests/data/miroir.jpg b/tests/data/miroir.jpg deleted file mode 100755 index 03240fa..0000000 Binary files a/tests/data/miroir.jpg and /dev/null differ diff --git a/tests/data/miroir.png b/tests/data/miroir.png deleted file mode 100644 index 5021949..0000000 Binary files a/tests/data/miroir.png and /dev/null differ diff --git a/tests/data/miroir2-64.png b/tests/data/miroir2-64.png deleted file mode 100644 index 8e32479..0000000 Binary files a/tests/data/miroir2-64.png and /dev/null differ diff --git a/tests/data/miroir2.png b/tests/data/miroir2.png deleted file mode 100644 index 67ca209..0000000 Binary files a/tests/data/miroir2.png and /dev/null differ diff --git a/tests/data/mirror.jpg b/tests/data/mirror.jpg new file mode 100755 index 0000000..03240fa Binary files /dev/null and b/tests/data/mirror.jpg differ diff --git a/tests/data/mirror.png b/tests/data/mirror.png new file mode 100644 index 0000000..5021949 Binary files /dev/null and b/tests/data/mirror.png differ diff --git a/tests/data/mirror2-64.png b/tests/data/mirror2-64.png new file mode 100644 index 0000000..8e32479 Binary files /dev/null and b/tests/data/mirror2-64.png differ diff --git a/tests/data/mirror2.png b/tests/data/mirror2.png new file mode 100644 index 0000000..67ca209 Binary files /dev/null and b/tests/data/mirror2.png differ diff --git a/tests/img_surf.c b/tests/img_surf.c index f7bbb33..45c357e 100644 --- a/tests/img_surf.c +++ b/tests/img_surf.c @@ -1,10 +1,10 @@ #include "test.h" -const char *imgPath = TESTS_DATA_ROOT "/miroir.jpg"; -const char* imgPath2 = TESTS_DATA_ROOT "/miroir.png"; -const char* imgPath3 = TESTS_DATA_ROOT "/filled.png"; -const char *imgPath4 = TESTS_DATA_ROOT "/miroir2.png"; -const char *imgPath5 = TESTS_DATA_ROOT "/miroir2-64.png"; +const char *imgPath = TESTS_DATA_ROOT "miroir.jpg"; +const char* imgPath2 = TESTS_DATA_ROOT "miroir.png"; +const char* imgPath3 = TESTS_DATA_ROOT "filled.png"; +const char *imgPath4 = TESTS_DATA_ROOT "miroir2.png"; +const char *imgPath5 = TESTS_DATA_ROOT "miroir2-64.png"; void paint() { VkvgContext ctx = vkvg_create(surf); diff --git a/tests/svg.c b/tests/svg.c index 7a40026..2fb855a 100644 --- a/tests/svg.c +++ b/tests/svg.c @@ -3,8 +3,8 @@ #include "vkvg-svg.h" static float rotation = 0.f; -static const char *path = "data/tiger.svg"; -static const char *svgSubPath = "data/checkbox.svg"; +static const char *path = TESTS_DATA_ROOT "tiger.svg"; +static const char *svgSubPath = TESTS_DATA_ROOT "checkbox.svg"; void svg_surface() { VkvgSurface svgSurf = vkvg_surface_create_from_svg(device, test_width, test_height, path);