FomeLayer
FomeLayer
关注数: 0
粉丝数: 9
发帖数: 903
关注贴吧数: 15
请教前辈们关于这套配置的建议以及一些其他相关问题(感谢) 暑假兼职三个月可能存个一万左右,想自己配置一台新的机器。目前用的Y7000 1660ti感觉有点卡顿了开几个Excel都加载半天 不知道是不是计划报废的原因(平时保养的还挺好的)。日常使用需求就是机器学习、数据处理、游戏开发、小建模渲染这些,有时间的话可能尝鲜一下新出的3A(大概率是没时间了...),然后个人比较喜欢白色,所以颜值上大概就是配白色的主机了。 配置表如下,都是最近京东的价(但是暑假没法配出来,兼职完暑假才有点米米) 显卡:七彩虹 RTX4070 Ultra W - 4800 主板:ROG STRIX B760-G GAMING WIFI D5小吹雪 - 1400 核心:i5 13600kf - 2100 内存:宏碁掠夺者(白色) 16GB*2 d5 6GHz C30 - 720 硬盘:致态TiPlus7100 1TB - 440 散热:Frozen Magic 240冰封幻境 - 290 电源:长城 650W 全模组 - 380 机箱:半岛铁盒(PADO)W1白色 - 130 合计:10260 然后想请教各位前辈一些问题: (1)最近浏览了很多装机视频、帖子,感觉大家都配置的很便宜,但是个人不太相信拼多多,所以如果只从京东购入的话这套配置是不是没啥压缩的空间了呀?看过微星的B760 MAX只要1200,但是B站上翻车视频也有一些,所以最终还是没有选择微星。 (2)这款主板的IO散热装甲会不会挡住显卡呢? (3)不在双十一期间购入有可能这个价位实现吗?因为怕买的人多退的人也多,怕买到退货翻新的商品。 (4)不考虑价格的话,整体配置上有没有什么问题呢?(比如CPU和显卡不合适或者CPU和内存不匹配这些问题) (5)白色机箱(非海景房)有没有什么推荐呢? 感谢各位
彩色泡泡 -- Bubbles 楼主忙里偷闲做的小玩意 使用VS2019编译,用C++写的 大概效果如下图(泡泡产生的位置就是鼠标啦) 泡泡会变小然后上升:代码如下: #include <graphics.h> #include <vector> #include <random> #include <ctime> using namespace std; // Global sets const int WINDOW_WID = 648; const int WINDOW_HEI = 480; const int ANIMAT_TME = 12; const int TREMBL_FAC = 10; const int MAXBBL_RAD = 35; const int MAXBBL_SPD = 25; const int RELOAD_TME = 4; const int RELOAD_SPD = 2; // Data struct Bubble { float radius; COLORREF color; float posx; float posy; float spdx; float spdy; bool ACTIVE; Bubble(float rd, float px, float py, float sx, float sy, bool A = true, COLORREF col = WHITE) { radius = rd; posx = px; posy = py; spdx = sx; spdy = sy; ACTIVE = A; color = col; } }; vector<Bubble*> bubbles; bool IsRunning; bool trigger; int CDtime; float mouse_x; float mouse_y; // Main frame void Initialize(); void ProcessInput(); void Updating(); void GenerateOutput(); void Delay(DWORD ms); void RunLoop(); void ShutDown(); // Other functions: int Abs(int n); float Abs(float n); int main() { Initialize(); RunLoop(); ShutDown(); return 0; } void Initialize() { initgraph(WINDOW_WID, WINDOW_HEI); BeginBatchDraw(); IsRunning = true; trigger = false; mouse_x = 0.0f; mouse_y = 0.0f; CDtime = RELOAD_TME; srand(unsigned int(time(NULL))); } void ProcessInput() { MOUSEMSG m; while (MouseHit()) { m = GetMouseMsg(); switch (m.uMsg) { case WM_MOUSEMOVE: mouse_x = m.x; mouse_y = m.y; break; case WM_LBUTTONDOWN: trigger = true; break; case WM_LBUTTONUP: trigger = false; break; case WM_RBUTTONDOWN: IsRunning = false; } } } void Updating() { // Add new bubble if (CDtime <= 0) { float sx = float((rand() % MAXBBL_SPD) * (rand() % 2 ? 1 : -1)); float sy = float((rand() % MAXBBL_SPD / 2.0f) * (rand() % 2 ? 1 : -1)); float rd = float(rand() % MAXBBL_RAD + 10); COLORREF col = RGB(rand() % 256, rand() % 256, rand() % 256); Bubble* temp = new Bubble(rd, mouse_x, mouse_y, sx, sy, true, col); bubbles.push_back(temp); CDtime = RELOAD_TME; } if (CDtime > 0) CDtime -= RELOAD_SPD; // Change bubbles speed and radius int len = bubbles.size(); for (int i = 0; i < len; ++i) { if (Abs(bubbles[i]->spdx) < float(MAXBBL_SPD)) { bubbles[i]->spdx -= bubbles[i]->spdx / 4.0f; } if (bubbles[i]->spdy > (-1.0f * MAXBBL_SPD) / 2.0f) { bubbles[i]->spdy += -0.5f; } bubbles[i]->radius -= bubbles[i]->radius / 10.0f; bubbles[i]->posx += bubbles[i]->spdx; bubbles[i]->posy += bubbles[i]->spdy; } // Mark the overboundary bubbles for (int i = 0; i < len; ++i) { if (bubbles[i]->posx < -10.0f || bubbles[i]->posx > float(WINDOW_WID + 10)) { bubbles[i]->ACTIVE = false; } else if (bubbles[i]->posy < -40.0f || bubbles[i]->posy > float(WINDOW_HEI + 40)) { bubbles[i]->ACTIVE = false; } else { } } // Delete the overboundary bubbles for (auto iter = bubbles.begin(); iter != bubbles.end();) { if (!(*iter)->ACTIVE) { delete (*iter); iter = bubbles.erase(iter); continue; } ++iter; } } void GenerateOutput() { cleardevice(); if (bubbles.size()) { int len = bubbles.size(); for (int i = 0; i < len; ++i) { setfillcolor(bubbles[i]->color); fillcircle(bubbles[i]->posx, bubbles[i]->posy, bubbles[i]->radius); setlinecolor(bubbles[i]->color); setlinestyle(PS_SOLID, 3); circle(bubbles[i]->posx, bubbles[i]->posy, bubbles[i]->radius + 4); } FlushBatchDraw(); } } void Delay(DWORD ms) { static DWORD oldtime = GetTickCount(); while (GetTickCount() - oldtime < ms) Sleep(1); oldtime = GetTickCount(); } void RunLoop() { while (IsRunning) { ProcessInput(); Updating(); GenerateOutput(); Delay(ANIMAT_TME); } } void ShutDown() { closegraph(); EndBatchDraw(); bubbles.clear(); } // Other functions: int Abs(int n) { if (n < 0) return -n; return n; } float Abs(float n) { if (n < 0.0f) return -n; return n; }
代码分享:简易贝塞尔曲线 前几天看了几篇关于手机动画效果的知乎文章,对贝塞尔曲线比较感兴趣,于是按照原理做了一个简易的示例,如果配合文件输入输出,也可以生成比例文件,不过由于楼主技术有限,不知道怎么指定文件相对位置,所以就只做了曲线显示部分啦。 鼠标左键:开启/关闭 移动指定的基点 鼠标右键:添加新的基点 鼠标中键:删除指定的基点 鼠标中键:调整曲线点的精度变化方向 效果如图啦:下面就贴代码啦(VS2019, C++11) #include <graphics.h> #include <list> #include <cmath> using namespace std; const int WINDOW_WID = 640; // 窗口宽度 const int WINDOW_HEI = 480; // 窗口高度 const int TIMEPERFRP = 14; // 每帧时间 const int BASELINE_B = 5; // 基线粗细 const int BASECIRC_R = 10; // 节点半径 double ACCURACY_A = 0.1; // 曲线精度(越小越平滑) double ACCURACY_B = -0.01; // 曲线精度改变量 bool mIsRunning; int Mousex; int Mousey; bool MouseLeft; bool MouseRight; bool MouseMid; bool MouseWheel; class Point { public: int mPosx; int mPosy; int mRadius; public: Point(); Point(const Point& p); Point(int x, int y); Point(int x, int y, int r); ~Point(); }; // 自定义的横坐标类 Point::Point() { mPosx = 0; mPosy = 0; mRadius = BASECIRC_R; } Point::Point(const Point& p) { mPosx = p.mPosx; mPosy = p.mPosy; mRadius = p.mRadius; } Point::Point(int x, int y) { mPosx = x; mPosy = y; mRadius = BASECIRC_R; } Point::Point(int x, int y, int r) { mPosx = x; mPosy = y; mRadius = r; } Point::~Point() { } list<Point> Bases; // 存储贝塞尔曲线基点 list<Point> Temps; // 存储贝塞尔曲线分点 void Initialize(); void ProcessInput(); void Update(); void GenerateOutput(); void RunLoop(); void ShutDown(); void Delay(DWORD ms); Point BezierCurve(const list<Point>& given, double ration); void DrawLine(const list<Point>& given); void DrawPoint(const list<Point>& given); int main() { Initialize(); RunLoop(); ShutDown(); return 0; } void Initialize() { initgraph(WINDOW_WID, WINDOW_HEI, SHOWCONSOLE); BeginBatchDraw(); mIsRunning = true; Mousex = 0.0; Mousey = 0.0; MouseLeft = false; MouseRight = false; MouseMid = false; MouseWheel = false; Bases.push_back(Point(50, 50)); Bases.push_back(Point(WINDOW_WID - 50, WINDOW_HEI - 50)); } void ProcessInput() { MOUSEMSG m; while (MouseHit()) { m = GetMouseMsg(); switch (m.uMsg) { case WM_MOUSEMOVE: Mousex = m.x; Mousey = m.y; break; case WM_LBUTTONDOWN: MouseLeft = !MouseLeft; break; case WM_RBUTTONDOWN: MouseRight = true; break; case WM_MBUTTONDOWN: MouseMid = true; break; case WM_MOUSEWHEEL: MouseWheel = true; break; default: break; } } } void Update() { if (MouseLeft) { for (auto iter = Bases.begin(); iter != Bases.end(); ++iter) { int Distance = sqrt(pow(Mousex - iter->mPosx, 2) + pow(Mousey - iter->mPosy, 2)); if (int(Distance) <= BASECIRC_R + 5) { iter->mPosx = Mousex; iter->mPosy = Mousey; break; } } } if (MouseRight) { Bases.push_back(Point(Mousex, Mousey)); MouseRight = false; } if (MouseMid) { if (Bases.size() > 2) // 如果只剩一个点的话,就无法形成曲线了,不允许删除最后两个点 { for (auto iter = Bases.begin(); iter != Bases.end(); ++iter) { int Distance = sqrt(pow(Mousex - iter->mPosx, 2) + pow(Mousey - iter->mPosy, 2)); if (int(Distance) <= BASECIRC_R + 5) { Bases.erase(iter); break; } } } // 改变精度调整方向 ACCURACY_B *= -1.0; MouseMid = false; } if (MouseWheel) { if (ACCURACY_A > 0.05 && ACCURACY_A < 1.0) { ACCURACY_A += ACCURACY_B; } else ACCURACY_A = 0.1; MouseWheel = false; } // Calculate Bezier Curve point double ratio = 0.0; Temps.clear(); // 清空上一次的节点 while (ratio < 1.0) { Temps.push_back(BezierCurve(Bases, ratio)); ratio += ACCURACY_A; } } void GenerateOutput() { cleardevice(); // Draw Basic Points setlinestyle(PS_SOLID | PS_ENDCAP_FLAT, 3); setlinecolor(BLUE); setfillcolor(GREEN); DrawPoint(Bases); // Draw Basic lines setlinecolor(WHITE); setlinestyle(PS_SOLID | PS_ENDCAP_FLAT, BASELINE_B); DrawLine(Bases); // Draw Bezier Curve Point setlinestyle(PS_SOLID, 2); setlinecolor(YELLOW); setfillcolor(WHITE); DrawPoint(Temps); // Draw Bezier Curve Line setlinecolor(GREEN); setlinestyle(PS_SOLID | PS_ENDCAP_FLAT, BASELINE_B / 2); DrawLine(Temps); FlushBatchDraw(); } void RunLoop() { while (mIsRunning) { ProcessInput(); Update(); GenerateOutput(); Delay(TIMEPERFRP); } } void Delay(DWORD ms) { static DWORD oldtime = GetTickCount(); while (GetTickCount() - oldtime < ms) Sleep(1); oldtime = GetTickCount(); } void ShutDown() { Bases.clear(); Temps.clear(); EndBatchDraw(); closegraph(); closegraph(); } Point BezierCurve(const list<Point>& given, double ration) { list<Point> copy = given; list<Point> store; while (copy.size() > 1) { for (auto iter = copy.begin(); iter != copy.end(); ++iter) { int x1 = iter->mPosx; int y1 = iter->mPosy; iter++; if (iter != copy.end()) { int x2 = iter->mPosx; int y2 = iter->mPosy; // Create next point int tempx = x1 + int((x2 - x1) * ration); int tempy = y1 + int((y2 - y1) * ration); store.push_back(Point(tempx, tempy, BASECIRC_R / 2)); } iter--; } copy.clear(); copy = store; store.clear(); } return *copy.begin(); } void DrawLine(const list<Point>& given) { for (auto iter = given.begin(); iter != given.end(); ++iter) { int tempx1 = iter->mPosx; int tempy1 = iter->mPosy; iter++; if (iter != given.end()) { int tempx2 = iter->mPosx; int tempy2 = iter->mPosy; line(tempx1, tempy1, tempx2, tempy2); } iter--; } } void DrawPoint(const list<Point>& given) { for (auto iter = given.begin(); iter != given.end(); ++iter) { fillcircle(iter->mPosx, iter->mPosy, iter->mRadius); } } 可能有点多ho,这次楼主比较懒,木有写注释,不过和楼主上一次发的水果刀基本框架是一样的囖。 贝塞尔曲线的原理大家直接百度就有很详细的解释,楼主直接照搬百度说的做
代码分享:水果忍者的切割线 晚上突然觉得,好久没有用过EasyX了(大作业用了SDL2...),于是想稍微复习一下,写了一个简单的小示例,这个效果有点像以前水果忍者那个刀的线段。楼主还处于EasyX小白阶段中,有很多地方不规范,请大家多多指教了 下面贴代码啦(C++,VS2019): #include <graphics.h> #include <cmath> #include <list> using namespace std; const int WINDOW_WID = 640; // 窗口宽度 const int WINDOW_HEI = 480; // 窗口高度 const int CURSOR_LEN = 10; // 鼠标准星粗细 const double PAI = 3.1415926; // 自己定义的pai const double TimeofCreateCD = 0.4; // 创建线段的冷却时间 const double LineExist = 2.0; // 创建的这段线段的留存时间 const double LineDown = 0.05; // 每帧线段的留存时间减少量 bool mIsRunning; // 示例是否在运行的标志 double Mousex; // 鼠标的横坐标 double Mousey; // 鼠标的纵坐标 double MouseDegree; // 鼠标准星的旋转角度(默认设置为不旋转,把相应注释取消即可) double MouseAnguSpeed; // 鼠标准星每帧增加的旋转角度 bool MouseClick; // 鼠标左键是否按下 double CreateCD; // 用于记录当前“创建线段”的CD是否冷却完毕 class Point { public: int mPosx; int mPosy; double mExist; public: Point(); Point(int x, int y, double e); ~Point(); void CountDown(double t); }; // 自定义的横坐标类 Point::Point() { mPosx = 0; mPosy = 0; mExist = 2.0; } Point::Point(int x, int y, double e) { mPosx = x; mPosy = y; mExist = e; } Point::~Point() { } void Point::CountDown(double t) { mExist -= t; } list<Point> points; // 利用list弹出元素自动调用析构函数的特性 void Initialize(); // 初始化函数(用于新建窗口还有一些其他变量) void Update(); // 更新要显示的对象各种数据(比如线段粗细) void ProcessInput(); // 处理鼠标输入(Easyx自带的输入检测是阻塞式的,需要转换) void GenerateOutput(); // 打印到屏幕 void RunLoop(); // 循环运行 void ShutDown(); // 结束程序 void Delay(DWORD ms); // 每帧停留时间 int main() { Initialize(); RunLoop(); ShutDown(); return 0; } void Initialize() { initgraph(WINDOW_WID, WINDOW_HEI); BeginBatchDraw(); mIsRunning = true; Mousex = 0.0; Mousey = 0.0; MouseClick = false; MouseDegree = 0.0; MouseAnguSpeed = 0.0; CreateCD = 1.0; } void Update() { if (MouseClick) // 取消注释以启用鼠标准星旋转 { //MouseAnguSpeed += 0.05; } else { if (MouseAnguSpeed > 0.0) { MouseAnguSpeed -= 0.01; } if (MouseAnguSpeed < 0.0) { MouseAnguSpeed = 0.0; } } MouseDegree += MouseAnguSpeed; // Update tail line effect CreateCD -= 0.1; // 最好不要连续创建线段,否则看起来像曲线 if (MouseClick && CreateCD < 0.0) { points.push_back(Point(Mousex, Mousey, LineExist)); CreateCD = TimeofCreateCD; // 更新创建线段的冷却时间 } if (points.size()) // 存在点列才检测是否消减线段 { for (auto iter = points.begin(); iter != points.end(); ++iter) { iter->CountDown(LineDown); } if (points.begin()->mExist < 0.0) { points.pop_front(); // 该线段已经很细,可以消除 } } } void ProcessInput() { MOUSEMSG m; while (MouseHit()) { m = GetMouseMsg(); switch (m.uMsg) { case WM_MOUSEMOVE: Mousex = m.x; Mousey = m.y; break; case WM_LBUTTONDOWN: MouseClick = true; break; case WM_LBUTTONUP: MouseClick = false; break; case WM_RBUTTONDOWN: mIsRunning = false; break; } } } void GenerateOutput() { cleardevice(); // 刷新屏幕 // Draw Cursor for (int i = 0; i < 4; ++i) { int tempx1 = Mousex + CURSOR_LEN * cos(MouseDegree + double(i) * 2.0 * PAI / 4.0); int tempy1 = Mousey + CURSOR_LEN * sin(MouseDegree + double(i) * 2.0 * PAI / 4.0); int tempx2 = Mousex + 2.0 * CURSOR_LEN * cos(MouseDegree + double(i) * 2.0 * PAI / 4.0); int tempy2 = Mousey + 2.0 * CURSOR_LEN * sin(MouseDegree + double(i) * 2.0 * PAI / 4.0); setlinestyle(PS_SOLID | PS_ENDCAP_FLAT, 5); line(tempx1, tempy1, tempx2, tempy2); // 画出准星线段 } // Draw tail if (points.size() >= 2) { for (auto iter = points.begin(); iter != points.end(); ++iter) { int tempx1 = iter->mPosx; int tempy1 = iter->mPosy; iter++; if (iter != points.end()) { int tempx2 = iter->mPosx; int tempy2 = iter->mPosy; setlinestyle(PS_SOLID | PS_ENDCAP_ROUND, int(10.0 * (iter->mExist / LineExist))); line(tempx1, tempy1, tempx2, tempy2); } iter--; } } FlushBatchDraw(); // 批量绘图(或者双缓冲?) } void RunLoop() { while (mIsRunning) { ProcessInput(); // 处理输入 Update(); // 更新对象 GenerateOutput(); // 显示 Delay(10); // 显示一段时间 } } void ShutDown() { EndBatchDraw(); closegraph(); } void Delay(DWORD ms) { static DWORD oldtime = GetTickCount(); while (GetTickCount() - oldtime < ms) Sleep(1); oldtime = GetTickCount(); } Relaese版本的示例exe在github上: https://github.com/Karen-Cyber/my-practice/tree/master/Easy_X_Demo/Blade%20of%20Fruit%20Ninja
大一学弟声泪俱下的求助[关于马克思主义理论实践课程的问题] 马理的老师讲了一个下午可是我只记得一丢丢啊,我们的课程有一项要求向基层党组织发放调查问卷再回收上交,请问有学长学姐的马理实践课内容是这个的嘛,这个问卷到底有哪些人是可以发方填写的呢,知情的学长学姐ballballyou了,不然,三周的暑假我根本不知道怎么完成这个作业呀
关于入手正版FL的问题【带哥萌康一康吧】 请问百度FL官网那个中文官网是真的吗,可以再上面直接买吗?
1
下一页