十四,间接漫反射用到球体中

间接光照分为间接漫反射和间接镜面反射。

辐照度图是用来适用于间接漫反射的。

直射光也有漫反射,对比下两者。

直接光kD * albedo / PI * radiance * NdotL;其中radiance * NdotL是光照,
间接光:
kD * texture(irradianceMap, N).rgb* albedo* ao
其中texture(irradianceMap, N).rgb是光照,
ao是环境光遮蔽,属于环境光特有,比如熟悉的ssao.间接光本来就是环境光,只是更细化了。
接着看,albedo是颜色,两者共有。
接下来几句是共有的。
kD *= 1.0 - metallic;
这句话可以看出纯金属是没有漫反射的。

    vec3 kS = F;vec3 kD = vec3(1.0) - kS;

在这里插入图片描述

   这句话可以看出漫反射率是由菲尼尔公式提供的。

对于直射光来说,菲涅尔公式
vec3 F0 = vec3(0.04);
F0 = mix(F0, albedo, metallic);

vec3 F = fresnelSchlick(max(dot(H, V), 0.0), F0);
vec3 H = normalize(V + L);
看似是只与角度和F0相关(即与金属度相关),但是实际上也是与粗糙度相关的。
如下图所示,微表面半向量与粗糙度相关。
在这里插入图片描述
在间接光漫反射中,模拟菲涅尔方程时,输入参数是视线和法线方向之间的夹角,就要考虑这个粗糙度了。
即vec3 kS = fresnelSchlickRoughness(max(dot(N, V), 0.0), F0,roughness);
“vec3 fresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness) \n”
“{ \n”
" return F0 + (max(vec3(1.0-roughness),F0 ) -F0) * pow(1.0 - cosTheta, 5.0); \n"
“} \n”
运行结果如下

在这里插入图片描述
代码如下:
//通过Liblas读取.las文件,并在osg中显示出来,用shader,先在片元着色器指定使用绿色
#include
#include

#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgUtil/Optimizer>
#include <osg/CoordinateSystemNode>

#include <osg/Switch>
#include <osg/Types>
#include <osgText/Text>

#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>

#include <osgGA/TrackballManipulator>
#include <osgGA/FlightManipulator>
#include <osgGA/DriveManipulator>
#include <osgGA/KeySwitchMatrixManipulator>
#include <osgGA/StateSetManipulator>
#include <osgGA/AnimationPathManipulator>
#include <osgGA/TerrainManipulator>
#include <osgGA/SphericalManipulator>

#include <osgGA/Device>

#include
#include <osg/Shader>
#include <osg/BlendFunc>
#include <osg/blendColor>
#include <osg/Point>
#include <osg/Shapedrawable>
#include <osgUtil/SmoothingVisitor>

#include <osg/TextureCubeMap>

static const char * vertexShader_PBR =
{
“in vec3 aPos; \n”
“in vec3 aNormal; \n”
“varying vec3 WorldPos; \n”
“varying vec3 Normal; \n”
“uniform mat4 normalMatrix; \n”
“void main() \n”
“{ \n”
" WorldPos = aPos; \n"
" Normal = vec3(normalMatrix * vec4(aNormal,1.0)); \n"
" gl_Position = ftransform(); \n"
“}\n”
};

static const char psShader_PBR =
{
“#version 330 core \n”
“out vec4 FragColor; \n”
“varying vec3 WorldPos; \n”
“varying vec3 Normal; \n”
“uniform vec3 albedo; \n”
“uniform float metallic; \n”
“uniform float roughness; \n”
“uniform float ao; \n”
//IBL
“uniform samplerCube irradianceMap;”
“uniform vec3 lightPositions[4]; \n”
“uniform vec3 lightColors[4]; \n”
“uniform vec3 camPos; \n”
“const float PI = 3.14159265359; \n”
“float DistributionGGX(vec3 N, vec3 H, float roughness) \n”
“{ \n”
" float a = roughness
roughness; \n"
" float a2 = aa; \n"
" float NdotH = max(dot(N, H), 0.0); \n"
" float NdotH2 = NdotH
NdotH; \n"
" float nom = a2; \n"
" float denom = (NdotH2 * (a2 - 1.0) + 1.0); \n"
" denom = PI * denom * denom; \n"
" return nom / denom; \n"
“} \n”
“float GeometrySchlickGGX(float NdotV, float roughness) \n”
“{ \n”
" float r = (roughness + 1.0); \n"
" float k = (r*r) / 8.0; \n"
" float nom = NdotV; \n"
" float denom = NdotV * (1.0 - k) + k; \n"
" return nom / denom; \n"
“} \n”
“float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness) \n”
“{ \n”
" float NdotV = max(dot(N, V), 0.0); \n"
" float NdotL = max(dot(N, L), 0.0); \n"
" float ggx2 = GeometrySchlickGGX(NdotV, roughness); \n"
" float ggx1 = GeometrySchlickGGX(NdotL, roughness); \n"
" return ggx1 * ggx2; \n"
“} \n”
“vec3 fresnelSchlick(float cosTheta, vec3 F0) \n”
“{ \n”
" return F0 + (1.0 - F0) * pow(clamp(1.0 - cosTheta, 0.0, 1.0), 5.0); \n"
“} \n”
“vec3 fresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness) \n”
“{ \n”
" return F0 + (max(vec3(1.0-roughness),F0 ) -F0) * pow(1.0 - cosTheta, 5.0); \n"
“} \n”
“void main() \n”
“{ \n”
" vec3 N = normalize(Normal); \n"
" vec3 V = normalize(camPos - WorldPos); \n"
" vec3 F0 = vec3(0.04); \n"
" F0 = mix(F0, albedo, metallic); \n"
" vec3 Lo = vec3(0.0); \n"
" for (int i = 0; i < 4; ++i) \n"
" { \n"
" vec3 L = normalize(lightPositions[i] - WorldPos); \n"
" vec3 H = normalize(V + L); \n"
" float distance = length(lightPositions[i] - WorldPos); \n"
" float attenuation = 1.0 / (distance * distance); \n"
" vec3 radiance = lightColors[i] * attenuation; \n"
" float NDF = DistributionGGX(N, H, roughness); \n"
" float G = GeometrySmith(N, V, L, roughness); \n"
" vec3 F = fresnelSchlick(clamp(dot(H, V), 0.0, 1.0), F0); \n"
" vec3 numerator = NDF * G * F; \n"
" float denominator = 4.0 * max(dot(N, V), 0.0) * max(dot(N, L), 0.0) + 0.0001; \n"
" vec3 specular = numerator / denominator; \n"
" vec3 kS = F; \n"
" vec3 kD = vec3(1.0) - kS; \n"
" kD *= 1.0 - metallic; \n"
" float NdotL = max(dot(N, L), 0.0); \n"
" Lo += (kD * albedo / PI + specular) * radiance * NdotL; \n"
" } \n"
" vec3 kS = fresnelSchlickRoughness(max(dot(N, V), 0.0), F0,roughness); \n"
“vec3 kD = 1.0 - kS;”
" kD = 1.0 - metallic; \n"
“vec3 irradiance = texture(irradianceMap, N).rgb;”
“vec3 diffuse = irradiance * albedo;”
" vec3 ambient = (kD * diffuse)
ao; \n"
" vec3 color = ambient + Lo; \n"
" color = color / (color + vec3(1.0)); \n"
" color = pow(color, vec3(1.0 / 2.2)); \n"
" FragColor = vec4(color, 1.0); \n"
//" FragColor = vec4(1.0,0.0,0.0, 1.0); \n"
“} \n”
};

osg::ref_ptrosg::Geode CreateSphereGeode()
{
osg::ref_ptrosg::Geode geode = new osg::Geode;
osg::ref_ptrosg::Vec3Array vertices = new osg::Vec3Array(6);
(*vertices)[0].set(0.0f, 0.0f, 1.0f);
(*vertices)[1].set(-0.5f, -0.5f, 0.0f);
(*vertices)[2].set(0.5f, -0.5f, 0.0f);
(*vertices)[3].set(0.5f, 0.5f, 0.0f);
(*vertices)[4].set(-0.5f, 0.5f, 0.0f);
(*vertices)[5].set(0.0f, 0.0f, -1.0f);
osg::ref_ptrosg::DrawElementsUInt indices = new osg::DrawElementsUInt(GL_TRIANGLES, 24);
(*indices)[0] = 0; (*indices)[1] = 1; (*indices)[2] = 2;
(*indices)[3] = 0; (*indices)[4] = 2; (*indices)[5] = 3;
(*indices)[6] = 0; (*indices)[7] = 3; (*indices)[8] = 4;
(*indices)[9] = 0; (*indices)[10] = 4; (*indices)[11] = 1;
(*indices)[12] = 5; (*indices)[13] = 2; (*indices)[14] = 1;
(*indices)[15] = 5; (*indices)[16] = 3; (*indices)[17] = 2;
(*indices)[18] = 5; (*indices)[19] = 4; (*indices)[20] = 3;
(*indices)[21] = 5; (*indices)[22] = 1; (*indices)[23] = 4;
osg::ref_ptrosg::Geometry geom = new osg::Geometry;
geom->setVertexArray(vertices.get());
geom->addPrimitiveSet(indices.get());
osgUtil::SmoothingVisitor::smooth(*geom);
geode->addDrawable(geom);
return geode;

}

osg::ref_ptrosg::Geode renderSphere(osg::Vec3f pos)
{
osg::ref_ptrosg::Geode geode = new osg::Geode;
const unsigned int X_SEGMENTS = 64;
const unsigned int Y_SEGMENTS = 64;
const float PI = 3.14159265359f;
osg::ref_ptrosg::Vec3Array vertices = new osg::Vec3Array;
osg::ref_ptrosg::Vec3Array normalArray = new osg::Vec3Array;
for (unsigned int x = 0; x <= X_SEGMENTS; ++x)
{
for (unsigned int y = 0; y <= Y_SEGMENTS; ++y)
{
float xSegment = (float)x / (float)X_SEGMENTS;
float ySegment = (float)y / (float)Y_SEGMENTS;
float xPos = std::cos(xSegment * 2.0f * PI) * std::sin(ySegment * PI);
float yPos = std::cos(ySegment * PI);
float zPos = std::sin(xSegment * 2.0f * PI) * std::sin(ySegment * PI);

		vertices->push_back(osg::Vec3(xPos, yPos, zPos) + pos);normalArray->push_back(osg::Vec3(xPos, yPos, zPos));}
}
osg::ref_ptr<osg::DrawElementsUInt> indices = new osg::DrawElementsUInt();
bool oddRow = false;
for (unsigned int y = 0; y < Y_SEGMENTS; ++y)
{if (!oddRow) // even rows: y == 0, y == 2; and so on{for (unsigned int x = 0; x <= X_SEGMENTS; ++x){indices->push_back(y       * (X_SEGMENTS + 1) + x);indices->push_back((y + 1) * (X_SEGMENTS + 1) + x);}}else{for (int x = X_SEGMENTS; x >= 0; --x){indices->push_back((y + 1) * (X_SEGMENTS + 1) + x);indices->push_back(y       * (X_SEGMENTS + 1) + x);}}oddRow = !oddRow;
}
int indexCount = static_cast<unsigned int>(indices->size());
indices->setMode(GL_TRIANGLE_STRIP);osg::ref_ptr<osg::Geometry> geom = new osg::Geometry;
geom->setVertexArray(vertices.get());
geom->addPrimitiveSet(indices.get());
geom->setNormalArray(normalArray, osg::Array::BIND_PER_VERTEX);geom->setVertexAttribArray(1, vertices, osg::Array::BIND_PER_VERTEX);
geom->setVertexAttribArray(2, normalArray, osg::Array::BIND_PER_VERTEX);//osgUtil::SmoothingVisitor::smooth(*geom);
geode->addDrawable(geom);
return geode;

}

class EyePointCallback : public osg::UniformCallback
{
public:
EyePointCallback(osg::ref_ptrosg::Camera camera)
{
_camera = camera;
}

virtual void operator() (osg::Uniform* uniform, osg::NodeVisitor* nv)
{osg::Vec3 eye, center, up;_camera->getViewMatrixAsLookAt(eye, center, up);uniform->set(eye);
}

private:
osg::ref_ptrosg::Camera _camera;
};

class ProjectMatrixCallback : public osg::UniformCallback
{
public:
ProjectMatrixCallback(osg::ref_ptrosg::Camera camera)
{
_camera = camera;
}

virtual void operator() (osg::Uniform* uniform, osg::NodeVisitor* nv)
{osg::Matrixd projectionMatrix = _camera->getProjectionMatrix();uniform->set(projectionMatrix);
}

private:
osg::ref_ptrosg::Camera _camera;
};
class ViewMatrixCallback : public osg::UniformCallback
{
public:
ViewMatrixCallback(osg::ref_ptrosg::Camera camera)
{
_camera = camera;
}

virtual void operator() (osg::Uniform* uniform, osg::NodeVisitor* nv)
{osg::Matrixd viewMatrix = _camera->getViewMatrix();uniform->set(viewMatrix);
}

private:
osg::ref_ptrosg::Camera _camera;
};
int main()
{
osg::ref_ptrosg::TextureCubeMap tcm = new osg::TextureCubeMap;
tcm->setTextureSize(512, 512);
tcm->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
tcm->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
tcm->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
tcm->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
tcm->setWrap(osg::Texture::WRAP_R, osg::Texture::CLAMP_TO_EDGE);

std::string strImagePosX = "D:/irradiance/Right face camera.bmp";
osg::ref_ptr<osg::Image> imagePosX = osgDB::readImageFile(strImagePosX);
tcm->setImage(osg::TextureCubeMap::POSITIVE_X, imagePosX);
std::string strImageNegX = "D:/irradiance/Left face camera.bmp";
osg::ref_ptr<osg::Image> imageNegX = osgDB::readImageFile(strImageNegX);
tcm->setImage(osg::TextureCubeMap::NEGATIVE_X, imageNegX);std::string strImagePosY = "D:/irradiance/Front face camera.bmp";;
osg::ref_ptr<osg::Image> imagePosY = osgDB::readImageFile(strImagePosY);
tcm->setImage(osg::TextureCubeMap::POSITIVE_Y, imagePosY);
std::string strImageNegY = "D:/irradiance/Back face camera.bmp";;
osg::ref_ptr<osg::Image> imageNegY = osgDB::readImageFile(strImageNegY);
tcm->setImage(osg::TextureCubeMap::NEGATIVE_Y, imageNegY);std::string strImagePosZ = "D:/irradiance/Top face camera.bmp";
osg::ref_ptr<osg::Image> imagePosZ = osgDB::readImageFile(strImagePosZ);
tcm->setImage(osg::TextureCubeMap::POSITIVE_Z, imagePosZ);
std::string strImageNegZ = "D:/irradiance/Bottom face camera.bmp";
osg::ref_ptr<osg::Image> imageNegZ = osgDB::readImageFile(strImageNegZ);
tcm->setImage(osg::TextureCubeMap::NEGATIVE_Z, imageNegZ);osg::ref_ptr<osg::Uniform> tex0Uniform = new osg::Uniform("irradianceMap", 0);osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer;osg::ref_ptr<osg::Camera> camera = viewer->getCamera();
osg::ref_ptr<osg::Uniform> camPosUniform = new osg::Uniform("camPos", osg::Vec3f(0, 0, 0));
camPosUniform->setUpdateCallback(new EyePointCallback(camera));osg::Matrix viewMatrix = camera->getViewMatrix();
osg::Matrix projMatrix = camera->getProjectionMatrix();
osg::Vec3f eye, center, up;
camera->getViewMatrixAsLookAt(eye, center, up);//osg::ref_ptr<osg::Uniform> camPosUniform = new osg::Uniform("camPos", eye);
osg::ref_ptr<osg::Uniform> viewMatrixUniform = new osg::Uniform("view", viewMatrix);
viewMatrixUniform->setUpdateCallback(new ViewMatrixCallback(camera));
osg::ref_ptr<osg::Uniform> projMatrixUniform = new osg::Uniform("projection", projMatrix);
projMatrixUniform->setUpdateCallback(new ProjectMatrixCallback(camera));
osg::ref_ptr<osg::Group> grp = new osg::Group;
//漫反射比率
osg::Vec3f albedo(0.5f, 0.0f, 0.0f);
osg::ref_ptr<osg::Uniform> albedoUniform = new osg::Uniform("albedo", albedo);
float ao = 1.0f;
osg::ref_ptr<osg::Uniform> aoUniform = new osg::Uniform("ao", ao);int nrRows = 7;
int nrColumns = 7;
float spacing = 2.5;
float ballRadius = 1.0f;osg::ref_ptr<osg::Vec3Array> lightColors = new osg::Vec3Array;
lightColors->push_back(osg::Vec3(300.0f, 300.0f, 300.0f));
lightColors->push_back(osg::Vec3(300.0f, 300.0f, 300.0f));
lightColors->push_back(osg::Vec3(300.0f, 300.0f, 300.0f));
lightColors->push_back(osg::Vec3(300.0f, 300.0f, 300.0f));osg::ref_ptr<osg::Uniform> lightColorsUniform = new osg::Uniform(osg::Uniform::FLOAT_VEC3, "lightColors", lightColors->size());
for (int i = 0; i < lightColors->size(); i++)
{lightColorsUniform->setElement(i, lightColors->at(i));
}
osg::ref_ptr<osg::Vec3Array> lightPositions = new osg::Vec3Array;
lightPositions->push_back(osg::Vec3(-10.0f, 10.0f, 10.0f));
lightPositions->push_back(osg::Vec3(10.0f, 10.0f, 10.0f));
lightPositions->push_back(osg::Vec3(-10.0f, -10.0f, 10.0f));
lightPositions->push_back(osg::Vec3(10.0f, -10.0f, 10.0f));osg::ref_ptr<osg::Uniform> lightPositionsUniform = new osg::Uniform(osg::Uniform::FLOAT_VEC3, "lightPositions", lightPositions->size());
for (int i = 0; i < lightPositions->size(); i++)
{lightPositionsUniform->setElement(i, lightPositions->at(i));
}
for (int row = 0; row < nrRows; row++)
{float metallic = row * 1.0 / nrRows;for (int col = 0; col < nrColumns; col++){float roughness = col * 1.0 / nrColumns;if (roughness <0.05){roughness = 0.05;}if (roughness > 1.0){roughness = 1.0;}osg::Vec3 ballCenter((col - (nrColumns / 2)) * spacing,(row - (nrRows / 2)) * spacing,0.0f);osg::Matrix worldMatrix = osg::Matrix::translate(ballCenter);osg::Matrix inverse;inverse.invert(worldMatrix);osg::Matrix transPose;transPose.transpose(inverse);osg::ref_ptr<osg::Geode> geode = renderSphere(ballCenter);{osg::ref_ptr<osg::StateSet> stateset = geode->getOrCreateStateSet();stateset->setTextureAttributeAndModes(0, tcm, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON);osg::ref_ptr<osg::Shader> vs = new osg::Shader(osg::Shader::VERTEX, vertexShader_PBR);osg::ref_ptr<osg::Shader> ps = new osg::Shader(osg::Shader::FRAGMENT, psShader_PBR);osg::ref_ptr<osg::Program> program = new osg::Program;program->addBindAttribLocation("aPos", 1);program->addBindAttribLocation("aNormal", 2);program->addShader(vs);program->addShader(ps);osg::ref_ptr<osg::Uniform> metallicUniform = new osg::Uniform("metallic", metallic);osg::ref_ptr<osg::Uniform> roughnessUniform = new osg::Uniform("roughness", roughness);//osg::ref_ptr<osg::Uniform> transposeInverseMatrixUniform = new osg::Uniform("normalMatrix", transPose);osg::Uniform* transposeInverseMatrixUniform = stateset->getOrCreateUniform("normalMatrix", osg::Uniform::FLOAT_MAT4);transposeInverseMatrixUniform->set(transPose);stateset->addUniform(albedoUniform);stateset->addUniform(metallicUniform);stateset->addUniform(roughnessUniform);stateset->addUniform(aoUniform);stateset->addUniform(lightPositionsUniform);stateset->addUniform(lightColorsUniform);stateset->addUniform(transposeInverseMatrixUniform);stateset->addUniform(viewMatrixUniform);stateset->addUniform(projMatrixUniform);stateset->addUniform(camPosUniform);stateset->addUniform(tex0Uniform);stateset->setAttribute(program, osg::StateAttribute::ON);}grp->addChild(geode);}}
grp->addChild(renderSphere(osg::Vec3(-10.0f, 10.0f, 10.0f)));
grp->addChild(renderSphere(osg::Vec3(10.0f, 10.0f, 10.0f)));
grp->addChild(renderSphere(osg::Vec3(-10.0f, -10.0f, 10.0f)));
grp->addChild(renderSphere(osg::Vec3(10.0f, -10.0f, 10.0f)));viewer->getCamera()->setClearColor(osg::Vec4(0.1f, 0.1f, 0.1f, 1.0f));
viewer->setSceneData(grp);
viewer->run();return 0;

}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/143313.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

SD-MTSP:萤火虫算法(FA)求解单仓库多旅行商问题MATLAB(可更改数据集,旅行商的数量和起点)

一、萤火虫算法&#xff08;FA&#xff09;简介 萤火虫算法(Firefly Algorithm&#xff0c;FA)是Yang等人于2009年提出的一种仿生优化算法。 参考文献&#xff1a;田梦楚, 薄煜明, 陈志敏, et al. 萤火虫算法智能优化粒子滤波[J]. 自动化学报, 2016, 42(001):89-97. 二、单仓…

八大排序详解

目录 1.排序的概念及应用 1.1 排序的概念 1.2 排序的应用 1.3 常见的排序算法 2.常见排序算法的实现 2.1 直接插入排序 2.1.1 基本思想 2.1.2 动图解析 2.1.3 排序步骤&#xff08;默认升序&#xff09; 2.1.4 代码实现 2.1.5 特性总结 2.2 希尔排序 2.2.1 基本思…

HarmonyOS开发:封装一个便捷的Log工具类

前言 日志打印&#xff0c;没什么好说的&#xff0c;系统已给我们提供&#xff0c;且调用也是非常的简单&#xff0c;我们封装的目的&#xff0c;一是扩展&#xff0c;打印一些不常见的类型&#xff0c;比如格式化json&#xff0c;使得日志看起来比较好看&#xff0c;二是&…

GEO生信数据挖掘(二)下载基因芯片平台文件及注释

检索到目标数据集后&#xff0c;开始数据挖掘&#xff0c;本文以阿尔兹海默症数据集GSE1297为例 目录 下载平台文件 1.AnnotGPL参数改为TRUE,联网下载芯片平台的soft文件。&#xff08;国内网速奇慢经常中断&#xff09; 2.手工去GEO官网下载 转换芯片探针ID为gene name 拓…

智能合约经典漏洞案例,xSurge 重入漏洞+套利 综合运用

智能合约经典漏洞案例&#xff0c;xSurge 重入漏洞套利 综合运用 1. 事件介绍 xSurge 被攻击事件发生在 2021-08-16 日&#xff0c;距离今天已经近 1 年了&#xff0c;为什么还会选择这个事件进行分析&#xff1f;主要是这个攻击过程很有意思&#xff0c;有以下的几点思考 使…

UG\NX二次开发 通过点云生成曲面 UF_MODL_create_surf_from_cloud

文章作者:里海 来源网站:《里海NX二次开发3000例专栏》 感谢粉丝订阅 感谢 Rlgun 订阅本专栏,非常感谢。 简介 有网友想做一个通过点云生成曲面的程序,我们也试一下 效果 代码 #include "me.hpp" /*HEAD CREATE_SURF_FROM_CLOUD CCC UFUN */

【2023年11月第四版教材】第15章《风险管理》(合集篇)

第15章《风险管理》&#xff08;合集篇&#xff09; 1 章节说明2 管理基础2.1 风险的属性2.2 风险的分类★★★2.3 风险成本★★★2.4 管理新实践 3 管理过程4 管理ITTO汇总★★★5 过程1-规划风险管理6 过程2-识别风险6.1 识别风险★★★6.2 数据收集★★★6.3 数据分析★★★…

基于微信小程序快递取件上门预约服务系统设计与实现(开题报告+任务书+源码+lw+ppt +部署文档+讲解)

文章目录 前言运行环境说明用户的主要功能有&#xff1a;管理员的主要功能有&#xff1a;具体实现截图详细视频演示代码参考论文参考源码获取 前言 &#x1f497;博主介绍&#xff1a;✌全网粉丝10W,CSDN特邀作者、博客专家、CSDN新星计划导师、全栈领域优质创作者&#xff0c;…

范数Norm-衡量向量大小的方法

性质 非负性: 范数的值总是非负的,且当且仅当向量全为零时,范数的值为零。 齐次性: 对于任意实数α,有 三角不等式: 对于任意向量x和y,有 常见范数 L1: 向量所有元素绝对值的和,权重稀疏 L2:欧几里得范数,权重平滑 无穷范数:表示向量中最大的元素 为什么使用范…

【VUE复习·6】监视属性watch:用途、两种写法、简写、应用时注意事项(重点)、深度监视(重点)

总览 1.监视属性是用来干什么的&#xff1f; 2.监视属性的两种写法 3.应用时注意事项 4.深度监视 一、监视属性是用来干什么的&#xff1f; 1.用途 监视一个值&#xff08;可以是基本属性 data&#xff0c;或者是计算属性 computed&#xff09;是否被改变。如果此值被改变&…

C语言-变量与数据类型

一、基本语法 1、注释 注释&#xff08;Comments&#xff09;可以出现在代码中的任何位置&#xff0c;用来向用户提示或解释代码的含义。程序编译时&#xff0c;会忽略注释&#xff0c;不做任何处理。 C 语言有两种注释方式&#xff1a; &#xff08;1&#xff09;单行注释 …

3+单基因泛癌+铜死亡纯生信思路

今天给同学们分享一篇3单基因泛癌铜死亡纯生信思路的生信文章“Systematic pan-cancer analysis identifies SLC31A1 as a biomarker in multiple tumor types”&#xff0c;这篇文章于2023年3月27日发表在BMC Med Genomics 期刊上&#xff0c;影响因子为3.622。 溶质载体家族3…

【Unity】简单的深度虚化shader

【Unity】简单的深度虚化shader 实现效果 可以用于对地图场景边界的白模处理 实现方法 1.关键方法 UnityObjectToClipPos&#xff1a;将物体坐标转换为屏幕坐标 LinearEyeDepth&#xff1a;将屏幕坐标中的z值转换为实际的深度值 saturate&#xff1a;将值规范到0~1之间&a…

【AI视野·今日Robot 机器人论文速览 第四十一期】Tue, 26 Sep 2023

AI视野今日CS.Robotics 机器人学论文速览 Tue, 26 Sep 2023 Totally 73 papers &#x1f449;上期速览✈更多精彩请移步主页 Daily Robotics Papers Extreme Parkour with Legged Robots Authors Xuxin Cheng, Kexin Shi, Ananye Agarwal, Deepak Pathak人类可以通过以高度动态…

成为吃鸡战场的王者!分享顶级战术干货,助您提高战斗力!

各位吃鸡战场的玩家们&#xff0c;欢迎来到本视频&#xff01;在这里&#xff0c;我将为您呈现一些与众不同的吃鸡干货&#xff0c;帮助您提高战斗力、轻松吃鸡&#xff01; 首先&#xff0c;让我们谈一谈作图工具推荐。绝地求生作图工具是吃鸡玩家们的必备利器。我将给大家推荐…

IDEA运行第一个Java简单程序(新建项目到运行类)

目录 前言 一、准备工作 JDK下载安装 1.IDEA下载安装 二、IDEA建立项目 &#xff08;一&#xff09;新建项目&#xff08;银河系&#xff09; &#xff08;二&#xff09;新建模块&#xff08;地球&#xff09; &#xff08;三&#xff09;新建包&#xff08;国家&#…

1.3python基础语法——PyCharm

1&#xff09;PyCharm的作用 python的集成开发环境&#xff0c;功能如下&#xff1a; Project管理 智能提示 语法高亮 代码跳转 调试代码 解释代码(解释器) 框架和库 2&#xff09;下载与安装 下载地址&#xff1a;http://www.jetbrains.com/pycharm/download/#sectionwind…

查询表中的全部列的数据

MySQL从小白到总裁完整教程目录:https://blog.csdn.net/weixin_67859959/article/details/129334507?spm1001.2014.3001.5502 语法格式: select from * 表名; 说明: * 表示所有列 由于不写where子句&#xff0c;表示无条件&#xff0c;找到所有的行&#xff01; 准备工作:执…

【计算机网络笔记九】I/O 多路复用

阻塞 IO 和 非阻塞 IO 阻塞 I/O 和 非阻塞 I/O 的主要区别&#xff1a; 阻塞 I/O 执行用户程序操作是同步的&#xff0c;调用线程会被阻塞挂起&#xff0c;会一直等待内核的 I/O 操作完成才返回用户进程&#xff0c;唤醒挂起线程非阻塞 I/O 执行用户程序操作是异步的&#xf…

909. 蛇梯棋

909. 蛇梯棋 题目-中等难度示例1. bfs 题目-中等难度 给你一个大小为 n x n 的整数矩阵 board &#xff0c;方格按从 1 到 n2 编号&#xff0c;编号遵循 转行交替方式 &#xff0c;从左下角开始 &#xff08;即&#xff0c;从 board[n - 1][0] 开始&#xff09;每一行交替方向…